Files
deepseek-harness/packages/experimental/claude-code-mods/tests/examples.spec.ts
T
Tianyi Cui a161070a76 test(experimental): run the example mod tests through a spec the coverage lane inventories
The coverage partitions list *.spec.ts files only, so the published
*.test.ts files reached no partition and the test kit's mount paths went
uncovered there. examples.spec.ts imports them by computed path; the kit
resolves the mod under test from the outermost describe when the file runs
through a spec.
2026-10-03 06:03:30 +08:00

14 lines
630 B
TypeScript

/**
* The example mods' own `claude plugin test` files, run as this package's
* spec so the coverage lane, which inventories `*.spec.ts` only, sees them.
* Each file's outermost `describe` names the example directory the test kit
* loads. The imports are computed so the Host typecheck project keeps the
* published tests out of its file list.
*/
import { resolve } from 'node:path'
import { pathToFileURL } from 'node:url'
for (const example of ['token-weather', 'blast-radius', 'replay-theater']) {
await import(pathToFileURL(resolve(import.meta.dirname, '../examples', example, 'tests', `${example}.test.ts`)).href)
}