fwa
v2.0.6
Published
Compiled TypeScript test runner for Node.js
Maintainers
Readme
fwa
Compiled TypeScript test runner for Node.js®.
fwa runs JavaScript tests emitted by TypeScript, while keeping recursive test
discovery deterministic and independent from shell glob behavior.
It does not replace node:test. It prepares a safe file list before delegating
execution to the native Node.js test runner.
CLI usage | TypeScript config | Stale compiled tests | Public API
Installation
npm install --save-dev fwaQuick Start
Recommended script:
{
"scripts": {
"build": "tsc",
"test": "fwa"
}
}Run:
npm run build
npm testfwa does not compile TypeScript. It expects compiled JavaScript tests to
already exist in outDir.
When To Use
Use fwa when a project:
- reads
rootDirandoutDirfrom TypeScript config; - recursively finds compiled
*.test.jsand*.spec.jsfiles; - blocks compiled tests whose source files no longer exist;
- prunes those files only when
--pruneis used; - fails when source tests are newer than compiled tests;
- passes the final file list to native
node:test.
It does not replace node:test. It prepares a safe file list before delegating
execution to the native Node.js test runner.
