fix(test): improve capture reliability and runner cleanup (#609)

* test: make capture fixtures readiness-aware and strengthen assertions

* fix(test): escalate child termination and report cleanup failures

* perf(test): use runner concurrency and lock shared build outputs
This commit is contained in:
morluto
2026-10-06 01:32:46 +08:00
committed by GitHub
parent bae87b4ded
commit d19686a2a5
14 changed files with 318 additions and 107 deletions
@@ -407,7 +407,7 @@ describe("source-map dependency coverage of hard-to-parse sources", () => {
it("keeps recovered edges from a partly recovered source and reports them as partial", async () => {
const result = await fetchWithSources([
'with (scope) { require("./c.js"); }\nimport "./a.js";',
'with (scope) { require("./c.js"); }\nrequire("./b.js");\nimport "./a.js";',
]);
expect(result.status).toBe("partial");
expect(result.items[0]?.status).toBe("partial");
@@ -416,7 +416,7 @@ describe("source-map dependency coverage of hard-to-parse sources", () => {
);
expect(
result.items[0]?.original_module_edges.map(({ specifier }) => specifier),
).toEqual(["./c.js", "./a.js"]);
).toEqual(["./b.js", "./a.js"]);
});
it("distinguishes an unparsable source from a source with no imports", async () => {