mirror of
https://github.com/microsoft/vscode-extension-samples.git
synced 2026-06-13 07:10:26 +08:00
25 lines
525 B
TypeScript
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() |