From: Eduardo San Martin Morote Date: Thu, 5 Dec 2024 10:16:12 +0000 (+0100) Subject: test: better IM after hash X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=731c9ee319c7a75712f2b56a20e95771d1fd8d2c;p=thirdparty%2Fvuejs%2Frouter.git test: better IM after hash --- diff --git a/packages/router/__tests__/location.spec.ts b/packages/router/__tests__/location.spec.ts index 98dadf1e..0511ad89 100644 --- a/packages/router/__tests__/location.spec.ts +++ b/packages/router/__tests__/location.spec.ts @@ -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' }, }) })