mirror of
https://github.com/morluto/rea
synced 2026-10-26 06:16:17 -04:00
test(browser): cover SAZ capture-level null member limitation
This commit is contained in:
@@ -2,6 +2,13 @@ import { expect, it, vi } from "vitest";
|
||||
import { AnalysisCapabilityUnavailableError } from "../../domain/analysisErrorCore.js";
|
||||
import { NodeCaptureAdapter } from "./NodeCaptureAdapter.js";
|
||||
|
||||
it.each(["har", "qlog"] as const)(
|
||||
"keeps SAZ-specific limitations out of %s captures",
|
||||
(format) => {
|
||||
expect(new NodeCaptureAdapter(format).limitations).toEqual([]);
|
||||
},
|
||||
);
|
||||
|
||||
vi.mock("./CaptureRelease.js", async (original) => ({
|
||||
...(await original<typeof import("./CaptureRelease.js")>()),
|
||||
NODE_CAPTURE_HEAP_ENFORCED: false,
|
||||
|
||||
@@ -640,13 +640,18 @@ it("reports zero-byte SAZ HTTP members as null instead of rejecting the archive"
|
||||
(await cli(path)).normalized_result,
|
||||
);
|
||||
expect(capture.total_records).toBe(2);
|
||||
expect(capture.limitations).toContainEqual(
|
||||
expect.stringMatching(
|
||||
/\babsent\b[^.]*\bzero-byte\b[^.]*\bHTTP members\b[^.]*\bnull\b/iu,
|
||||
),
|
||||
);
|
||||
expect(capture.records[0]?.reported).toMatchObject({
|
||||
request: { method: "GET" },
|
||||
request: { method: "GET", body: "" },
|
||||
response: null,
|
||||
});
|
||||
expect(capture.records[1]?.reported).toMatchObject({
|
||||
request: null,
|
||||
response: { status: "204" },
|
||||
response: { status: "204", body: "" },
|
||||
websocket: { member: "raw/2_w.txt" },
|
||||
});
|
||||
expect(capture.records[0]?.location).toEqual({
|
||||
|
||||
Reference in New Issue
Block a user