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);