feat: 初始化慧遇书院官网一期
This commit is contained in:
14
tests/filing.test.ts
Normal file
14
tests/filing.test.ts
Normal file
@@ -0,0 +1,14 @@
|
||||
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)
|
||||
})
|
||||
})
|
||||
Reference in New Issue
Block a user