mirror of
https://github.com/microsoft/vscode.git
synced 2026-05-08 09:08:48 +01:00
Converted mocha-runner to TS, indicated to exit smoke test on mocha tests termination.
This commit is contained in:
@@ -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());
|
||||
|
||||
@@ -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);
|
||||
});
|
||||
Reference in New Issue
Block a user