Move away from deprecated 'vscode' node module (#112718)

This commit is contained in:
Alexandru Dima
2020-12-17 21:40:14 +01:00
parent bcef72ddd0
commit 7ca71e763d
30 changed files with 117 additions and 11732 deletions

View File

@@ -4,7 +4,7 @@
*--------------------------------------------------------------------------------------------*/
const path = require('path');
const testRunner = require('vscode/lib/testrunner');
const testRunner = require('../../../../test/integration/electron/testrunner');
const options: any = {
ui: 'tdd',
@@ -38,3 +38,34 @@ if (process.env.BUILD_ARTIFACTSTAGINGDIRECTORY) {
testRunner.configure(options);
export = testRunner;
// import * as path from 'path';
// import * as Mocha from 'mocha';
// import * as glob from 'glob';
// export function run(testsRoot: string, cb: (error: any, failures?: number) => void): void {
// // Create the mocha test
// const mocha = new Mocha({
// ui: 'tdd'
// });
// mocha.useColors(true);
// glob('**/**.test.js', { cwd: testsRoot }, (err, files) => {
// if (err) {
// return cb(err);
// }
// // Add files to the test suite
// files.forEach(f => mocha.addFile(path.resolve(testsRoot, f)));
// try {
// // Run the mocha test
// mocha.run(failures => {
// cb(null, failures);
// });
// } catch (err) {
// console.error(err);
// cb(err);
// }
// });
// }