feat: 初始化慧遇书院官网一期

This commit is contained in:
2026-08-12 18:01:17 +08:00
commit 5d31ee5743
101 changed files with 17259 additions and 0 deletions

14
tests/filing.test.ts Normal file
View 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)
})
})