mirror of
https://github.com/lukaszraczylo/gohoarder.git
synced 2026-12-06 07:34:00 +00:00
The packages and security pages ask for one page of rows instead of the whole cache. Search is debounced, and the filters and sort stay in the URL.
12 lines
414 B
TypeScript
12 lines
414 B
TypeScript
import { describe, expect, it } from 'vitest'
|
|
import { packageRoute } from './packages'
|
|
|
|
describe('packageRoute', () => {
|
|
it('splits a name with slashes into route segments', () => {
|
|
expect(packageRoute({ registry: 'go', name: 'github.com/a/b', version: 'v1.0.0' })).toEqual({
|
|
name: 'package-details',
|
|
params: { registry: 'go', name: ['github.com', 'a', 'b'], version: 'v1.0.0' },
|
|
})
|
|
})
|
|
})
|