Skip to content

Node.js based forum software built for the modern web

test: add more info to failiing response

Barış Soner Uşaklı87fdca2a8a4f
diff --git a/test/api.js b/test/api.js
index 5e98d9f00c..06e1a1a3f1 100644
--- a/test/api.js
+++ b/test/api.js
@@ -532,7 +532,7 @@ describe('API', async () => {
assert(
responses.hasOwnProperty('418') ||
Object.keys(responses).includes(String(result.response.statusCode)),
- `${method.toUpperCase()} ${path} sent back unexpected HTTP status code: ${result.response.statusCode}`
+ `${method.toUpperCase()} ${path} sent back unexpected HTTP status code: ${result.response.statusCode}, body: ${JSON.stringify(result.body)} status: ${result.response.statusText}`,
);
});