mirror of
https://github.com/All-Hands-AI/OpenHands.git
synced 2026-01-08 22:38:05 -05:00
chroe(vscode): Refresh vscode integration lockfile (#9965)
Co-authored-by: openhands <openhands@all-hands.dev> Co-authored-by: Engel Nyst <enyst@users.noreply.github.com>
This commit is contained in:
1654
openhands/integrations/vscode/package-lock.json
generated
1654
openhands/integrations/vscode/package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@@ -1,8 +1,8 @@
|
|||||||
import * as path from "path";
|
import * as path from "path";
|
||||||
import Mocha = require("mocha"); // Changed import style
|
import Mocha = require("mocha");
|
||||||
import glob = require("glob"); // Changed import style
|
import { glob } from "glob"; // Updated for glob v9+ API
|
||||||
|
|
||||||
export function run(): Promise<void> {
|
export async function run(): Promise<void> {
|
||||||
// Create the mocha test
|
// Create the mocha test
|
||||||
const mocha = new Mocha({
|
const mocha = new Mocha({
|
||||||
// This should now work with the changed import
|
// This should now work with the changed import
|
||||||
@@ -13,33 +13,25 @@ export function run(): Promise<void> {
|
|||||||
|
|
||||||
const testsRoot = path.resolve(__dirname, ".."); // Root of the /src/test folder (compiled to /out/test)
|
const testsRoot = path.resolve(__dirname, ".."); // Root of the /src/test folder (compiled to /out/test)
|
||||||
|
|
||||||
return new Promise((c, e) => {
|
try {
|
||||||
// Use glob to find all test files (ending with .test.js in the compiled output)
|
// Use glob to find all test files (ending with .test.js in the compiled output)
|
||||||
glob(
|
const files = await glob("**/**.test.js", { cwd: testsRoot });
|
||||||
"**/**.test.js",
|
|
||||||
{ cwd: testsRoot },
|
|
||||||
(err: NodeJS.ErrnoException | null, files: string[]) => {
|
|
||||||
if (err) {
|
|
||||||
return e(err);
|
|
||||||
}
|
|
||||||
|
|
||||||
// Add files to the test suite
|
// Add files to the test suite
|
||||||
files.forEach((f: string) => mocha.addFile(path.resolve(testsRoot, f)));
|
files.forEach((f: string) => mocha.addFile(path.resolve(testsRoot, f)));
|
||||||
|
|
||||||
try {
|
// Run the mocha test
|
||||||
// Run the mocha test
|
return await new Promise<void>((resolve, reject) => {
|
||||||
mocha.run((failures: number) => {
|
mocha.run((failures: number) => {
|
||||||
if (failures > 0) {
|
if (failures > 0) {
|
||||||
e(new Error(`${failures} tests failed.`));
|
reject(new Error(`${failures} tests failed.`));
|
||||||
} else {
|
} else {
|
||||||
c();
|
resolve();
|
||||||
}
|
|
||||||
});
|
|
||||||
} catch (err) {
|
|
||||||
console.error(err);
|
|
||||||
e(err);
|
|
||||||
}
|
}
|
||||||
},
|
});
|
||||||
);
|
});
|
||||||
});
|
} catch (err) {
|
||||||
|
console.error(err);
|
||||||
|
throw err;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user