Skip to content

Commit ac2b279

Browse files
authored
Merge pull request #272 from conveyal/dev
Next release
2 parents 07f414a + ccc4098 commit ac2b279

File tree

3 files changed

+9
-0
lines changed

3 files changed

+9
-0
lines changed

README.md

+1
Original file line numberDiff line numberDiff line change
@@ -214,6 +214,7 @@ Options:
214214
-u, --update-snapshots Force update of snapshots. USE WITH CAUTION.
215215
--coverage Run Jest with coverage reporting
216216
--coverage-paths <paths> Extra paths to collect code coverage from
217+
--jest-cli-args <args> Extra arguments to pass directly to the Jest Cli. Make sure to encapsulate all extra arguments in quote
217218
--no-cache Run Jest without cache (defaults to using cache)
218219
--run-in-band Run all tests serially in the current process
219220
--setup-files <paths> Setup files to run before each test

bin/mastarm-test

+4
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,10 @@ commander
2626
'Extra paths to collect code coverage from'
2727
)
2828
.option('--force-exit', 'Force Jest to exit after all tests have completed running.')
29+
.option(
30+
'--jest-cli-args <args>',
31+
'Extra arguments to pass directly to the Jest Cli. Make sure to encapsulate all extra arguments in quotes'
32+
)
2933
.option('--no-cache', 'Run Jest without cache (defaults to using cache)')
3034
.option('--run-in-band', 'Run all tests serially in the current process')
3135
.option('--setup-files <paths>', 'Setup files to run before each test')

lib/jest.js

+4
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,10 @@ module.exports.generateTestConfig = (patterns, options) => {
7272

7373
jestArguments.push('--config', JSON.stringify(jestConfig))
7474

75+
if (options.jestCliArgs) {
76+
jestArguments = jestArguments.concat(...options.jestCliArgs.split(' '))
77+
}
78+
7579
if (patterns) {
7680
jestArguments = jestArguments.concat(patterns)
7781
}

0 commit comments

Comments
 (0)