The project uses Node.js built-in test runner with tsx for TypeScript execution. Currently npm test runs all tests once and exits. For development, a watch mode that re-runs tests on file changes would significantly speed up the feedback loop. Node.js 20+ supports --watch natively. Add a new test:watch script to package.json that uses the existing test command with the --watch flag.
Relevant files:
package.json — add a new script entry: "test:watch": "tsx --test --watch test/*.test.ts"
Acceptance criteria:
npm run test:watch starts the test runner in watch mode
- Changing a test file triggers a re-run
- The existing
npm test command is unchanged
The project uses Node.js built-in test runner with tsx for TypeScript execution. Currently
npm testruns all tests once and exits. For development, a watch mode that re-runs tests on file changes would significantly speed up the feedback loop. Node.js 20+ supports--watchnatively. Add a newtest:watchscript topackage.jsonthat uses the existing test command with the--watchflag.Relevant files:
package.json— add a new script entry:"test:watch": "tsx --test --watch test/*.test.ts"Acceptance criteria:
npm run test:watchstarts the test runner in watch modenpm testcommand is unchanged