gotools/test/runTest.js

24 lines
668 B
JavaScript
Raw Permalink Normal View History

2023-08-06 01:23:45 +03:00
const path = require('path');
2021-03-22 02:27:33 +03:00
2023-08-06 01:23:45 +03:00
const { runTests } = require('@vscode/test-electron');
2021-03-22 02:27:33 +03:00
async function main() {
try {
// The folder containing the Extension Manifest package.json
// Passed to `--extensionDevelopmentPath`
2023-08-06 01:23:45 +03:00
const extensionDevelopmentPath = path.resolve(__dirname, '../');
2021-03-22 02:27:33 +03:00
2023-08-06 01:23:45 +03:00
// The path to the extension test script
2021-03-22 02:27:33 +03:00
// Passed to --extensionTestsPath
const extensionTestsPath = path.resolve(__dirname, './suite/index');
// Download VS Code, unzip it and run the integration test
await runTests({ extensionDevelopmentPath, extensionTestsPath });
} catch (err) {
2023-08-06 01:23:45 +03:00
console.error('Failed to run tests', err);
2021-03-22 02:27:33 +03:00
process.exit(1);
}
}
main();