14 lines
552 B
TypeScript
14 lines
552 B
TypeScript
import { describe, expect, it } from 'vitest'
|
|
import { explainGuideStopListUrl } from '@/utils/explainNavigation'
|
|
|
|
describe('explain navigation', () => {
|
|
it('builds the hall-only guide-object URL', () => {
|
|
const url = explainGuideStopListUrl('hall-1', '恐龙厅')
|
|
expect(url.split('?')[0]).toBe('/pages/explain/guide-stop-list')
|
|
const params = new URLSearchParams(url.split('?')[1])
|
|
expect(params.get('hallId')).toBe('hall-1')
|
|
expect(params.get('hallName')).toBe('恐龙厅')
|
|
expect(params.has('unitId')).toBe(false)
|
|
})
|
|
})
|