feat(FN-2108): merge fusion/fn-2108

This commit is contained in:
gsxdsm
2026-04-18 22:53:07 -07:00
parent ecafaf496c
commit 83458f1eca
2 changed files with 235 additions and 71 deletions

View File

@@ -42,6 +42,7 @@ export async function request(
path: string,
body?: Buffer | string,
headers: Record<string, string> = {},
rawBody: Buffer | undefined = undefined,
): Promise<TestResponse> {
const normalizedBody = normalizeBody(body);
const socket = new MockSocket();
@@ -97,6 +98,10 @@ export async function request(
res.on("error", reject);
});
if (rawBody) {
(req as http.IncomingMessage & { rawBody?: Buffer }).rawBody = rawBody;
}
app(req, res);
process.nextTick(() => {