test: clarify source map and worker diagnostics

This commit is contained in:
morluto committed 2026-11-08 00:08:18 +08:00
1 parent 5cafea5ebe
commit 110932cd5e
4 files changed
+13 -10

No files matched your search

@@ -159,7 +159,7 @@ it("drains oversized checkpoint admission, reports output failure, and serves th
reason: "output",
resource: null,
limits: null,
message: "JavaScript worker admission frame is missing or oversized",
message: expect.stringMatching(/admission frame.*missing or oversized/iu),
});
expect(await server.next()).toMatchObject({
kind: "static",
@@ -198,7 +198,7 @@ it("reports missing checkpoint admission as output failure at stdin EOF", async
id: request.id,
reason: "output",
resource: null,
message: "JavaScript worker admission frame is missing or oversized",
message: expect.stringMatching(/admission frame.*missing or oversized/iu),
});
expect((await server.closed)[0]).toBe(0);
} finally {
@@ -63,8 +63,7 @@ it("uses the same conservative section classification for URL-plus-map and malfo
expect(malformed).toThrow(
expect.objectContaining({
reason: "format",
message:
"External source-map section URL must be a string. Section path: [0].",
message: expect.stringMatching(/section URL.*must be a string.*\[0\]/iu),
}),
);
});
@@ -82,7 +81,7 @@ it("rejects a present non-array sections member through the shared section-list
expect(malformed).toThrow(
expect.objectContaining({
reason: "format",
message: "Indexed source-map sections must be an array.",
message: expect.stringMatching(/sections.*must be an array/iu),
}),
);
});