π¦ 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
./testdirectory.
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
Config Fileβ
Multiple paths:
- poku.config.js
- .pokurc.jsonc
import { defineConfig } from 'poku';
export default defineConfig({
include: ['targetPathA', 'targetPathB'],
});
{
"$schema": "https://poku.io/schemas/configs.json",
"include": ["targetPathA", "targetPathB"]
}
A single path:
- poku.config.js
- .pokurc.jsonc
import { defineConfig } from 'poku';
export default defineConfig({
include: 'targetPath',
});
{
"$schema": "https://poku.io/schemas/configs.json",
"include": "targetPath"
}
The current directory (default):
- poku.config.js
- .pokurc.jsonc
import { defineConfig } from 'poku';
export default defineConfig({
include: '.',
});
{
"$schema": "https://poku.io/schemas/configs.json",
"include": "."
}