Files
vscode-extension-samples/helloworld-test-sample/test/runTest.ts
2019-05-22 18:01:45 -07:00

25 lines
525 B
TypeScript

import * as path from 'path'
import { runTests } from 'vscode-test'
async function go() {
try {
const extensionPath = path.resolve(__dirname, '../../')
const testRunnerPath = path.resolve(__dirname, './testRunner.js')
const testWorkspace = path.resolve(__dirname, '../../test/suite/fixture')
/**
* Basic usage
*/
await runTests({
extensionPath,
testRunnerPath,
testWorkspace
})
} catch (err) {
console.error('Failed to run tests')
process.exit(1)
}
}
go()