Skip to content
Source
Sign inSign up
TanStack/router
Open History to see the last commit

parseHref.test.ts

11 lines329 Bytes

1import { describe, expect, test } from 'vitest'
2import { parseHref } from '../src'
3​
4describe('parseHref', () => {
5 test('works', () => {
6 const parsed = parseHref('/foo?bar=baz#qux', {})
7 expect(parsed.pathname).toEqual('/foo')
8 expect(parsed.search).toEqual('?bar=baz')
9 expect(parsed.hash).toEqual('#qux')
10 })
11})