Skip to content

Commit

Permalink
fix(jest): ensure correct argv types
Browse files Browse the repository at this point in the history
  • Loading branch information
adamdbradley committed Aug 18, 2019
1 parent 9ab0637 commit 766ab26
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions src/testing/jest/jest-config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,16 @@ export function buildJestArgv(config: d.Config) {
const jestArgv = yargs(args).options(options).argv as d.JestArgv;
jestArgv.config = buildJestConfig(config);

if (typeof jestArgv.maxWorkers === 'string') {
try {
jestArgv.maxWorkers = parseInt(jestArgv.maxWorkers, 10);
} catch (e) {}
}

if (typeof jestArgv.ci === 'string') {
jestArgv.ci = (jestArgv.ci === 'true' || jestArgv.ci === '');
}

return jestArgv;
}

Expand Down

0 comments on commit 766ab26

Please sign in to comment.