diff --git a/test/smoke/src/main.js b/test/smoke/src/main.js index feedaf304e1..acf9db502d2 100644 --- a/test/smoke/src/main.js +++ b/test/smoke/src/main.js @@ -71,7 +71,7 @@ function runTests() { console.log('Running tests...') const spawn = require('child_process').spawn; var proc = spawn(process.execPath, [ - 'src/mocha-runner.js' + 'out/mocha-runner.js' ]); proc.stdout.on('data', data => { console.log(data.toString()); diff --git a/test/smoke/src/mocha-runner.js b/test/smoke/src/mocha-runner.ts similarity index 65% rename from test/smoke/src/mocha-runner.js rename to test/smoke/src/mocha-runner.ts index fe25e885544..62171a6dbc2 100644 --- a/test/smoke/src/mocha-runner.js +++ b/test/smoke/src/mocha-runner.ts @@ -3,19 +3,17 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -var Mocha = require('mocha'); -var path = require('path'); +const MochaTest = require('mocha'); +const path = require('path'); -var mocha = new Mocha({ +const mochaTest = new MochaTest({ timeout: 360000, retries: 2, slow: 50000, useColors: true }); -mocha.addFile(path.join(process.cwd(), 'out/test.js')); -mocha.run((failures) => { - process.on('exit', () => { - process.exit(failures); - }); +mochaTest.addFile(path.join(process.cwd(), 'out/test.js')); +mochaTest.run((failures) => { + process.exit(failures); }); \ No newline at end of file