import assert from 'node:assert/strict'; import { readFileSync } from 'node:fs'; import { join } from 'node:path'; import test from 'node:test'; test('governance settings is the unified dictionary entry for requirement and task types', () => { const sidebar = readFileSync('components/layout/Sidebar.tsx', 'utf8'); const permissions = readFileSync('lib/permissions.ts', 'utf8'); const governancePage = readFileSync('app/admin/governance/page.tsx', 'utf8'); const appModule = readFileSync(join(process.cwd(), '../server/src/app.module.ts'), 'utf8'); assert.match(sidebar, /治理设置/); assert.match(sidebar, /\/admin\/governance/); assert.doesNotMatch(sidebar, /\/admin\/categories/); assert.match(permissions, /governance:manage/); assert.match(appModule, /GovernanceModule/); assert.match(governancePage, /task_category/); assert.match(governancePage, /requirement_type/); assert.match(governancePage, /requirement_platform/); assert.match(governancePage, /requirement_source/); });