diffs plugin

This commit is contained in:
Gustavo Madeira Santana
2026-02-28 18:38:00 -05:00
parent fca0467082
commit 612ed5b3e1
23 changed files with 4067 additions and 4 deletions

View File

@@ -7,6 +7,7 @@ export function createMockServerResponse(): ServerResponse & { body?: string } {
statusCode: number;
body?: string;
setHeader: (key: string, value: string) => unknown;
getHeader: (key: string) => string | undefined;
end: (body?: string) => unknown;
} = {
headersSent: false,
@@ -15,6 +16,7 @@ export function createMockServerResponse(): ServerResponse & { body?: string } {
headers[key.toLowerCase()] = value;
return res;
},
getHeader: (key: string) => headers[key.toLowerCase()],
end: (body?: string) => {
res.headersSent = true;
res.body = body;