]> git.ipfire.org Git - thirdparty/vuejs/router.git/commitdiff
test: better IM after hash
authorEduardo San Martin Morote <posva13@gmail.com>
Thu, 5 Dec 2024 10:16:12 +0000 (11:16 +0100)
committerEduardo San Martin Morote <posva13@gmail.com>
Thu, 5 Dec 2024 10:16:12 +0000 (11:16 +0100)
packages/router/__tests__/location.spec.ts

index 98dadf1e8042afffbc17b09eefd2b7921712efc3..0511ad89ff28bb30ee94ebe2954b045bc19f5c53 100644 (file)
@@ -134,18 +134,18 @@ describe('parseURL', () => {
     })
   })
 
-  it('avoids ? after the hash', () => {
+  it('correctly parses a ? after the hash', () => {
     expect(parseURL('/foo#?a=one')).toEqual({
       fullPath: '/foo#?a=one',
       path: '/foo',
       hash: '#?a=one',
       query: {},
     })
-    expect(parseURL('/foo/#?a=one')).toEqual({
-      fullPath: '/foo/#?a=one',
+    expect(parseURL('/foo/?a=two#?a=one')).toEqual({
+      fullPath: '/foo/?a=two#?a=one',
       path: '/foo/',
       hash: '#?a=one',
-      query: {},
+      query: { a: 'two' },
     })
   })