Skip to main content
Version: v2.x.x

πŸ“¦ Include Directories and Files

By default, Poku searches for .test. and .spec. files, but you can customize it using the filter option.

History
VersionChanges
v2.1.0
Support for multiple paths in any order.
Deprecate --include flag.
Maintains retroactive support for multiple comma-separated paths to avoid breaking changes.

CLI​

Common usage​

# Same as ./
npx poku
  • Run all tests sequentially.
# Same as ./
npx poku --parallel
  • Run all tests in parallel.
npx poku ./test
  • Run all tests in ./test directory.
tip

You can pass both directories and files.

note

It's not possible to run tests in the .git and node_modules directories.


By setting multiple paths​

npx poku targetPathA targetPathB

By extending Glob patterns from shell​

You can also extend Glob patterns with npx, bun, yarn, etc.

For example, by running all the unit tests of a monorepo:

npx poku ./packages/**/test/unit

Now, listing all .js files instead of the default .test.|.spec.:

npx poku --filter='.js' ./packages/**/test/unit

Also, by bypassing the filter:

npx poku --filter='' ./packages/**/test/unit/*.js

API​

poku(targetPaths: string | string[])

await poku('targetPath');
await poku(['targetPathA', 'targetPathB']);
await poku('./');

Then, run the file directly with the preferred platform, for example:

node test/run.test.js
npx tsx test/run.test.ts