update vscode

This commit is contained in:
Siheng Zhao
2024-01-08 23:09:12 +08:00
parent 2b09b7ce41
commit 4f165cd618
1951 changed files with 303273 additions and 12 deletions

View File

@@ -0,0 +1,27 @@
"use strict";
/*---------------------------------------------------------
* Copyright (C) Microsoft Corporation. All rights reserved.
*--------------------------------------------------------*/
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.run = void 0;
const mocha_1 = __importDefault(require("mocha"));
async function run() {
const { mochaOpts, files, preload, colorDefault, } = JSON.parse(process.env.VSCODE_TEST_OPTIONS);
// Create the mocha test
const mocha = new mocha_1.default({
ui: 'tdd',
color: colorDefault,
...mochaOpts,
});
for (const file of preload) {
require(file);
}
for (const file of files) {
mocha.addFile(file);
}
await new Promise((resolve, reject) => mocha.run((failures) => failures ? reject(failures > 1 ? `${failures} tests failed.` : `${failures} test failed.`) : resolve()));
}
exports.run = run;