commit 15903309f0b72c5385b0006d39f6875aa3a8b157
parent 85ccfbd1e12f6f8cdac27b80cd1e7359cf64408e
Author: I Mean I'm Just Saying <imeanimjustsaying@kiwifarms.st>
Date: Sun, 20 Sep 2026 19:46:31 -0400
e2e: the editor stub must survive the fixture being rebuilt under it
Playwright starts both webServers at once and make-fixture.mjs rm -rf's the
fixture root, so on a fresh checkout the stub's request log has nowhere to go
at boot — and a throw there killed the stub before a single spec ran.
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Diffstat:
1 file changed, 10 insertions(+), 1 deletion(-)
diff --git a/umtool/e2e/fixtures/editor-stub.mjs b/umtool/e2e/fixtures/editor-stub.mjs
@@ -30,8 +30,17 @@ const requests = [];
const jobs = new Map();
let nextJob = 1;
+// BEST-EFFORT, and it has to be. This process and make-fixture.mjs are started
+// by playwright in parallel, and make-fixture rm -rf's the fixture root — so on
+// a fresh checkout the directory this writes into may not exist yet, and a
+// throw here would kill the stub before a single spec ran.
function record() {
- writeFileSync(LOG, JSON.stringify(requests, null, 2) + "\n");
+ try {
+ mkdirSync(path.dirname(LOG), { recursive: true });
+ writeFileSync(LOG, JSON.stringify(requests, null, 2) + "\n");
+ } catch {
+ /* the fixture root is mid-rebuild; the next request rewrites it */
+ }
}
record();