Open History to see the last commit
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})