Skip to content

Commit 79e3a46

Browse files
authored
Merge pull request #14 from rwjblue/add-common-jest-arguments-to-test-command
Add commont jest arguments to test command
2 parents d413aa4 + 70b7ad5 commit 79e3a46

1 file changed

Lines changed: 15 additions & 1 deletion

File tree

commands/local/test.js

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,21 @@ module.exports.command = 'test';
22
module.exports.aliases = ['t'];
33
module.exports.desc = 'Run your projects tests';
44

5-
module.exports.builder = function builder() {};
5+
module.exports.builder = function builder(yargs) {
6+
yargs.option('testNamePattern=[query]', {
7+
nargs: 1,
8+
string: true,
9+
requiresArg: true,
10+
description: 'Run only tests with a name that matches the regex',
11+
});
12+
13+
yargs.option('runInBand', {
14+
description:
15+
'Run all tests serially in the current process, rather than creating a worker pool of child processes that run tests. This can be useful for debugging.',
16+
});
17+
18+
return yargs;
19+
};
620

721
module.exports.handler = function handler() {
822
require('jest').run();

0 commit comments

Comments
 (0)