π¦ Include Directories and Files
By default, Poku searches for .test.
and .spec.
files, but you can customize it using the filter
option.
History
Version | Changes |
---|---|
v2.1.0 | --include flag. |
CLIβ
Common usageβ
# Same as ./
npx poku
- Run all tests in parallel.
# Same as ./
npx poku --sequential
- Run all tests sequentially.
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