feat: new CLI option --test-pattern

This commit is contained in:
Zoltan Kochan
2020-12-22 20:36:59 +02:00
parent 8065c47eec
commit 1ec47db33e
3 changed files with 11 additions and 0 deletions

View File

@@ -0,0 +1,6 @@
---
"@pnpm/common-cli-options-help": minor
"pnpm": minor
---
New CLI option added: --test-pattern.

View File

@@ -96,6 +96,10 @@ export const FILTERING = {
description: 'If a selector starts with !, it means the packages matching the selector must be excluded. E.g., "pnpm --filter !foo" selects all packages except "foo"',
name: '--filter !<selector>',
},
{
description: 'Defines files related to tests. Useful with the changed since filter. When selecting only changed packages and their dependent packages, the dependent packages will be ignored in case a package has changes only in tests. Usage example: pnpm --filter=...[origin/master] --test-pattern=test/* test',
name: '--test-pattern <pattern>',
},
],
title: 'Filtering options (run the command only on packages that satisfy at least one of the selectors)',
}

View File

@@ -34,6 +34,7 @@ export const GLOBAL_OPTIONS = R.pick([
'prefix',
'reporter',
'stream',
'test-pattern',
'workspace-packages',
'workspace-root',
], allTypes)