exclude
Exclui de acordo com o caminho usando Regex para corresponder apenas aos arquivos que devem ser executados.
CLI
# Exclui diretórios e arquivos dos testes
npx poku --exclude='algum-arquivo-ou-diretorio' ./test
# Exclui diretórios e arquivos dos testes
npx poku --exclude='algum-arquivo-ou-diretorio|outro-arquivo-ou-diretorio' ./test
API
/**
* Exclui diretórios dos testes
*/
await poku('./test', {
exclude: /\/(helpers|tools)\//,
});
/**
* Exclui diretórios dos testes
*/
await poku('./test', {
exclude: [/\/helpers\//, /\/tools\//],
});
/**
* Exclui arquivos específicos dos testes
*/
await poku('./test', {
exclude: /(index|common).test.ts/,
});
/**
* Exclui arquivos específicos dos testes
*/
await poku('./test', {
exclude: [/index.test.ts/, /common.test.ts/],
});
/**
* Exclui diretórios e arquivos dos testes
*/
await poku('./test', {
exclude: /\/(helpers|tools)\/|(index|common).test.ts/,
});
/**
* Exclui diretórios e arquivos dos testes
*/
await poku('./test', {
exclude: [/\/helpers\//, /\/tools\//, /index.test.ts/, /common.test.ts/],
});