fix tests

This commit is contained in:
Klemek
2021-03-30 12:48:04 +02:00
parent 0f5e40c9ff
commit 5e817cc296
2 changed files with 3 additions and 3 deletions
+1 -1
View File
@@ -25,7 +25,7 @@
},
"scripts": {
"start": "node src/server.js",
"test": "jest --silent",
"test": "jest --silent -i",
"install": "node src/postinstall.js"
},
"repository": {
+2 -2
View File
@@ -105,8 +105,8 @@ describe('Test error logging', () => {
fs.readFile(path.join(dataDir, 'error.log'), {encoding: 'UTF-8'}, (err, data) => {
expect(err).toBeNull();
const start = data.split('\n').slice(0, 2).join('\n');
const expected = '500 GET / ' + new Date().toUTCString() + ' ::ffff:127.0.0.1\nTypeError [ERR_INVALID_ARG_TYPE]: The "path" argument must be of type string. Received type object';
expect(start).toBe(expected);
const expected = '500 GET / ' + new Date().toUTCString() + ' ::ffff:127.0.0.1\nTypeError [ERR_INVALID_ARG_TYPE]: The "path" argument must be of type string.';
expect(start.indexOf(expected)).toBe(0);
done();
});
});