This commit is contained in:
Pine Wu
2019-05-24 12:04:16 -07:00
parent a0c17bdad3
commit 9afa954a81
2 changed files with 10 additions and 12 deletions

View File

@ -2,21 +2,22 @@ import * as path from 'path';
import { runTests } from 'vscode-test';
async function go() {
async function main() {
try {
// The folder containing the Extension Manifest package.json
// Passed to `--extensionDevelopmentPath`
const extensionPath = path.resolve(__dirname, '../../');
// The path to test runner
// Passed to --extensionTestsPath
const testRunnerPath = path.resolve(__dirname, './suite');
await runTests({
// The folder containing the Extension Manifest package.json
extensionPath,
// The path to test runner
testRunnerPath
});
// Download VS Code, unzip it and run the integration test
await runTests({ extensionPath, testRunnerPath });
} catch (err) {
console.error('Failed to run tests');
process.exit(1);
}
}
go();
main();

View File

@ -19,10 +19,7 @@ export function run(testsRoot: string, cb: (error: any, failures?: number) => vo
try {
// Run the mocha test
mocha
.run(failures => {
cb(null, failures);
});
mocha.run(failures => cb(null, failures));
} catch (err) {
cb(err);