fix tests
This commit is contained in:
+1
-1
@@ -25,7 +25,7 @@
|
|||||||
},
|
},
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"start": "node src/server.js",
|
"start": "node src/server.js",
|
||||||
"test": "jest --silent",
|
"test": "jest --silent -i",
|
||||||
"install": "node src/postinstall.js"
|
"install": "node src/postinstall.js"
|
||||||
},
|
},
|
||||||
"repository": {
|
"repository": {
|
||||||
|
|||||||
+2
-2
@@ -105,8 +105,8 @@ describe('Test error logging', () => {
|
|||||||
fs.readFile(path.join(dataDir, 'error.log'), {encoding: 'UTF-8'}, (err, data) => {
|
fs.readFile(path.join(dataDir, 'error.log'), {encoding: 'UTF-8'}, (err, data) => {
|
||||||
expect(err).toBeNull();
|
expect(err).toBeNull();
|
||||||
const start = data.split('\n').slice(0, 2).join('\n');
|
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';
|
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).toBe(expected);
|
expect(start.indexOf(expected)).toBe(0);
|
||||||
done();
|
done();
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user