diff --git a/test/smoke/test/index.js b/test/smoke/test/index.js index 346d0c1371..a0e63f46ba 100644 --- a/test/smoke/test/index.js +++ b/test/smoke/test/index.js @@ -33,8 +33,6 @@ if (process.env.BUILD_ARTIFACTSTAGINGDIRECTORY) { }; } -const mocha = new Mocha(options); - // {{SQL CARBON EDIT}} - If grep option is specified, only run the matching test cases (local test case development/debug scenario), // otherwise the value of 'RUN_UNSTABLE_TESTS' environment variable will be used to determine whether to run the stable test cases or the whole test suite. // Unstable test cases have "@UNSTABLE@" in their full name (test suite name + test name). @@ -43,12 +41,15 @@ if (!options.grep) { console.info('running all test cases.'); } else { console.info('running stable test cases.'); - mocha.grep('@UNSTABLE@').invert(); + options.grep= '@UNSTABLE@'; + options.invert = true; } } else { console.info('running test cases match the grep option.'); } // {{SQL CARBON EDIT}} - end of edit. +const mocha = new Mocha(options); + mocha.addFile('out/main.js'); mocha.run(failures => process.exit(failures ? -1 : 0));