mirror of
https://github.com/microsoft/vscode-extension-samples.git
synced 2026-06-13 07:10:26 +08:00
13 lines
354 B
TypeScript
13 lines
354 B
TypeScript
import * as path from 'path';
|
|
import * as cp from 'child_process';
|
|
|
|
export function run(testsRoot: string, cb: (error: any) => void): void {
|
|
const cmd = cp.spawnSync('npx', ['mocha'], { cwd: path.resolve(__dirname, '../../') })
|
|
|
|
console.log(cmd.stdout.toString())
|
|
if (cmd.status !== 0) {
|
|
cb(new Error('Mocha test failed'))
|
|
} else {
|
|
cb(null);
|
|
}
|
|
} |