Skip to main content
Version: v2.x.x

watch

Watches the events on tests and files that contains tests (after running all the tests), re-running the tests files that are updated for each new event.

History
VersionChanges
v2.2.0
Support for -w short flag.

CLI​

npx poku --watch

You can use the flag --watchInterval to set a custom interval for watch events in milliseconds:

Default is 1500

npx poku --watch --watchInterval=1500
  • Short flag: -w.

tip

Quickly reset and rerun all tests by typing rs on the console, followed by Enter.

  • This will clean and repopulate all the directories and files to be watched.
  • It's not possible to use it while the tests are running.

info

If it's not possible to determine which test file depends on the changed source file, no test will be run.


note

❌ Dynamic paths are not supported:

const dynamicPath = './some-file.js';

await import(dynamicPath);