fix(tests): stabilize diffs localReq headers (supersedes #39063)

Co-authored-by: Shennng <Shennng@users.noreply.github.com>
This commit is contained in:
Peter Steinberger
2026-03-07 18:57:27 +00:00
parent 253e159700
commit 0f53177971
2 changed files with 7 additions and 1 deletions

View File

@@ -140,9 +140,14 @@ describe("diffs plugin registration", () => {
});
});
function localReq(input: { method: string; url: string }): IncomingMessage {
function localReq(input: {
method: string;
url: string;
headers?: IncomingMessage["headers"];
}): IncomingMessage {
return {
...input,
headers: input.headers ?? {},
socket: { remoteAddress: "127.0.0.1" },
} as unknown as IncomingMessage;
}