diff options
Diffstat (limited to 'frontend-vanilla/src/router.test.ts')
| -rw-r--r-- | frontend-vanilla/src/router.test.ts | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/frontend-vanilla/src/router.test.ts b/frontend-vanilla/src/router.test.ts index c206d9c..d1a5d7f 100644 --- a/frontend-vanilla/src/router.test.ts +++ b/frontend-vanilla/src/router.test.ts @@ -38,6 +38,15 @@ describe('Router', () => { expect(route.path).toBe('/tag'); expect(route.params.tagName).toBe('Tech News'); }); + it('should parse settings path', () => { + vi.stubGlobal('location', { + href: 'http://localhost/v3/settings', + pathname: '/v3/settings', + search: '' + }); + const route = router.getCurrentRoute(); + expect(route.path).toBe('/settings'); + }); it('should parse query parameters', () => { vi.stubGlobal('location', { |
