Skip to content

dx: add a 'npm run test:watch' script using Node.js --watch flag #66

@George-iam

Description

@George-iam

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    dxDeveloper experience improvementsgood first issueGood for newcomers

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions