Skip to content

Commit

Permalink
retries again
Browse files Browse the repository at this point in the history
  • Loading branch information
adamraine committed Aug 15, 2023
1 parent 120dd29 commit a98ba71
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
6 changes: 6 additions & 0 deletions core/test/scripts/run-mocha-tests.js
Original file line number Diff line number Diff line change
Expand Up @@ -146,6 +146,9 @@ const rawArgv = y
'require': {
type: 'string',
},
'retries': {
type: 'number',
},
})
.wrap(y.terminalWidth())
.argv;
Expand Down Expand Up @@ -259,6 +262,7 @@ function exit({numberFailures, numberMochaInvocations}) {
* @property {boolean} bail
* @property {boolean} parallel
* @property {string | undefined} require
* @property {number | undefined} retries
*/

/**
Expand All @@ -281,6 +285,7 @@ async function runMocha(tests, mochaArgs, invocationNumber) {
// TODO: not working
// parallel: tests.length > 1 && mochaArgs.parallel,
parallel: false,
retries: mochaArgs.retries,
});

// @ts-expect-error - not in types.
Expand Down Expand Up @@ -325,6 +330,7 @@ async function main() {
bail: argv.bail,
parallel: argv.parallel,
require: argv.require,
retries: argv.retries,
};

mochaGlobalSetup();
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@
"unit-viewer": "yarn mocha --testMatch viewer/**/*-test.js",
"unit-flow": "bash flow-report/test/run-flow-report-tests.sh",
"unit": "yarn unit-flow && yarn mocha",
"unit:ci": "NODE_OPTIONS=--max-old-space-size=8192 npm run unit --forbid-only",
"unit:ci": "NODE_OPTIONS=--max-old-space-size=8192 npm run unit --forbid-only --retries=5",
"core-unit": "yarn unit-core",
"cli-unit": "yarn unit-cli",
"viewer-unit": "yarn unit-viewer",
Expand Down

0 comments on commit a98ba71

Please sign in to comment.