fix again http mock usage

This commit is contained in:
martin-mfg
2025-10-05 16:30:14 +02:00
parent 22266942b2
commit 186f7968e9
2 changed files with 2 additions and 5 deletions
+1 -4
View File
@@ -53,10 +53,7 @@ export function createMockRes() {
return { ...headers };
},
_getBody() {
return Buffer.concat(chunks).toString('utf8');
},
_getBuffer() {
return Buffer.concat(chunks);
return chunks.join('');
},
};
+1 -1
View File
@@ -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);