Skip to main content
Version: v2.x.x

exclude

Exclude by path using Regex to match only the files that should be performed.

CLI​

# Excluding directories and files from tests

npx poku --exclude='some-file-or-dir' ./test
# Excluding directories and files from tests

npx poku --exclude='some-file-or-dir|other-file-or-dir' ./test

API​

/**
* Excluding directories from tests
*/

await poku('./test', {
exclude: /\/(helpers|tools)\//,
});
/**
* Excluding directories from tests
*/

await poku('./test', {
exclude: [/\/helpers\//, /\/tools\//],
});
/**
* Excluding specific files from tests
*/

await poku('./test', {
exclude: /(index|common).test.ts/,
});
/**
* Excluding specific files from tests
*/

await poku('./test', {
exclude: [/index.test.ts/, /common.test.ts/],
});
/**
* Excluding directories and files from tests
*/

await poku('./test', {
exclude: /\/(helpers|tools)\/|(index|common).test.ts/,
});
/**
* Excluding directories and files from tests
*/

await poku('./test', {
exclude: [/\/helpers\//, /\/tools\//, /index.test.ts/, /common.test.ts/],
});