We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 47156d2 commit 92f0f40Copy full SHA for 92f0f40
run-mocha-tests.js
@@ -5,7 +5,8 @@ const Mocha = require('mocha');
5
6
function runMochaTests() {
7
return new Promise((resolve, reject) => {
8
- // https://github.com/mochajs/mocha/issues/995
+ // according to https://github.com/mochajs/mocha/issues/995
9
+ // "delete require.cache" is needed for running the same test multiple times
10
Object.keys( require.cache ).forEach( function( file ) {
11
delete require.cache[file];
12
});
@@ -18,7 +19,9 @@ function runMochaTests() {
18
19
}
20
21
// running the test multiple times
-runMochaTests()
22
- .then(runMochaTests)
23
24
-;
+let count = 20;
+let pr = runMochaTests();
+while (count > 0) {
25
+ pr = pr.then(runMochaTests);
26
+ count -= 1;
27
+}
0 commit comments