runTest.ts 653 B

1234567891011121314151617181920212223
  1. import * as path from "path"
  2. import { runTests } from "@vscode/test-electron"
  3. async function main() {
  4. try {
  5. // The folder containing the Extension Manifest package.json
  6. // Passed to `--extensionDevelopmentPath`
  7. const extensionDevelopmentPath = path.resolve(__dirname, "../../../src")
  8. // The path to the extension test script
  9. // Passed to --extensionTestsPath
  10. const extensionTestsPath = path.resolve(__dirname, "./suite/index")
  11. // Download VS Code, unzip it and run the integration test
  12. await runTests({ extensionDevelopmentPath, extensionTestsPath })
  13. } catch {
  14. console.error("Failed to run tests")
  15. process.exit(1)
  16. }
  17. }
  18. main()