From 186f7968e9008f03c0780f8b13ad52c26c6f46fa Mon Sep 17 00:00:00 2001 From: martin-mfg <2026226+martin-mfg@users.noreply.github.com> Date: Sun, 5 Oct 2025 16:30:14 +0200 Subject: [PATCH] fix again http mock usage --- frontend/frontend/src/mock-http.js | 5 +---- frontend/frontend/src/pages/Home/Home.js | 2 +- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/frontend/frontend/src/mock-http.js b/frontend/frontend/src/mock-http.js index 2179ce6c..f3f040cf 100644 --- a/frontend/frontend/src/mock-http.js +++ b/frontend/frontend/src/mock-http.js @@ -53,10 +53,7 @@ export function createMockRes() { return { ...headers }; }, _getBody() { - return Buffer.concat(chunks).toString('utf8'); - }, - _getBuffer() { - return Buffer.concat(chunks); + return chunks.join(''); }, }; diff --git a/frontend/frontend/src/pages/Home/Home.js b/frontend/frontend/src/pages/Home/Home.js index f4b64592..76b7866b 100644 --- a/frontend/frontend/src/pages/Home/Home.js +++ b/frontend/frontend/src/pages/Home/Home.js @@ -139,7 +139,7 @@ const HomeScreen = () => { }); const res = createMockRes(); router(req, res); - const body = res._getBuffer(); + const body = res._getBody(); const status = res._getStatusCode(); console.log('mock results: ', { status, body }); // console.log(router);