import { readFile } from 'node:fs/promises'; import { test } from 'node:test'; import assert from 'node:assert/strict'; const indexSource = await readFile(new URL('../src/index.js', import.meta.url), 'utf8'); test('C 端章末点读接口保持挂载,且不复活已下线的整套助手', () => { assert.match( indexSource, /app\.use\('\/api\/assistant\/tts',\s*assistantLimiter,\s*assistantTtsRouter\)/, ); assert.doesNotMatch(indexSource, /app\.use\('\/api\/assistant',/); });