15 lines
534 B
TypeScript
15 lines
534 B
TypeScript
import { describe, expect, it } from 'vitest'
|
|
import { getPoliceFilingUrl, MPS_FILING_URL } from '../app/utils/filing'
|
|
|
|
describe('公安备案链接', () => {
|
|
it('从备案文本中提取编号并生成查询链接', () => {
|
|
expect(getPoliceFilingUrl('沪公网安备 31010402001197号')).toBe(
|
|
'https://www.beian.gov.cn/portal/registerSystemInfo?recordcode=31010402001197',
|
|
)
|
|
})
|
|
|
|
it('没有编号时指向公安备案平台首页', () => {
|
|
expect(getPoliceFilingUrl('待配置')).toBe(MPS_FILING_URL)
|
|
})
|
|
})
|