vscode-omega
aien-dev/vscode-omega
Brought by drakestapleton
vscode-omega / test / vscode / run.js
| 1 | 'use strict'; |
| 2 | // Runs test/vscode/suite.js inside a real VS Code (the minimum supported version, 1.90.0) with this |
| 3 | // extension loaded from the working tree. Needs $OMC and a display (CI: xvfb-run). |
| 4 | const path = require('path'); |
| 5 | const { runTests } = require('@vscode/test-electron'); |
| 6 | |
| 7 | async function main() { |
| 8 | if (!process.env.OMC) throw new Error('set $OMC to an omc binary'); |
| 9 | const root = path.resolve(__dirname, '..', '..'); |
| 10 | await runTests({ |
| 11 | version: '1.90.0', |
| 12 | extensionDevelopmentPath: root, |
| 13 | extensionTestsPath: path.join(__dirname, 'suite.js'), |
| 14 | extensionTestsEnv: { OMC: process.env.OMC }, |
| 15 | launchArgs: ['--disable-extensions', '--disable-gpu', '--no-sandbox'], |
| 16 | }); |
| 17 | } |
| 18 | |
| 19 | main().catch((e) => { |
| 20 | process.stderr.write(`vscode test failed: ${e && e.message ? e.message : e}\n`); |
| 21 | process.exit(1); |
| 22 | }); |