mirror of
https://github.com/vrtmrz/obsidian-livesync.git
synced 2026-11-01 13:58:18 +00:00
Migrate CLI E2E tests to Node.js 26
Run the CLI subprocess suites and benchmark tools as native TypeScript with node:test, and move them under test/e2e-cli. Update CI and Compose runners, run local smoke tests on Linux, macOS, and Windows, and collect source-mapped CLI coverage with c8.
This commit is contained in:
1 parent
a0987016bb
commit
2433d117c2
91 files changed
+2219
-1615
No files matched your search
@@ -0,0 +1,21 @@
|
||||
import { spawnProcess } from "./helpers/process.ts";
|
||||
import { fileURLToPath } from "node:url";
|
||||
import TASKS from "./ci-tasks.json" with { type: "json" };
|
||||
|
||||
for (const [index, task] of TASKS.entries()) {
|
||||
console.log(`\n[CLI E2E ${index + 1}/${TASKS.length}] ${task}`);
|
||||
const child = spawnProcess(process.execPath, {
|
||||
args: [fileURLToPath(new URL("./run-task.ts", import.meta.url)), task],
|
||||
cwd: import.meta.dirname,
|
||||
stdin: "inherit",
|
||||
stdout: "inherit",
|
||||
stderr: "inherit",
|
||||
});
|
||||
const status = await child.status;
|
||||
if (!status.success) {
|
||||
console.error(`[CLI E2E] ${task} failed with exit code ${status.code}.`);
|
||||
process.exit(status.code);
|
||||
}
|
||||
}
|
||||
|
||||
console.log(`\n[CLI E2E] CI suite passed (${TASKS.length} tasks).`);
|
||||
Reference in new issue
Block a user