Sha256: 2cf401aaab5636234ff8853b8027a6f89d18a6e4d4a23a71eca11a3e7cb627aa
Contents?: true
Size: 606 Bytes
Versions: 78
Compression:
Stored size: 606 Bytes
Contents
import paramsFromHash from '../paramsFromHash'; test('can parse both hash and query params', () => { const { hash, params: { foo } } = paramsFromHash('#filters?foo=bar'); expect(hash).toBe('filters'); expect(foo).toBe('bar'); }); test('can parse just hash', () => { const { hash } = paramsFromHash('#filters'); expect(hash).toBe('filters'); }); test('can parse just query params', () => { const { params: { foo } } = paramsFromHash('?foo=bar'); expect(foo).toBe('bar'); }); test("won't error with blank string", () => { const { hash } = paramsFromHash(''); expect(hash).toBe(''); });
Version data entries
78 entries across 78 versions & 1 rubygems