Files
frontend-miniapp/tests/unit/ExplainNavigation.spec.ts
lyf cf6ad02318
Some checks failed
CI / verify (push) Has been cancelled
讲解对象列表接入展厅分页接口
2026-07-17 18:27:24 +08:00

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)
})
})