diff --git a/package.json b/package.json index ba7f518..63954ba 100644 --- a/package.json +++ b/package.json @@ -25,7 +25,7 @@ }, "scripts": { "start": "node src/server.js", - "test": "jest --silent", + "test": "jest --silent -i", "install": "node src/postinstall.js" }, "repository": { diff --git a/test/app.test.js b/test/app.test.js index 38e6002..7b6b702 100644 --- a/test/app.test.js +++ b/test/app.test.js @@ -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(); }); });