diff --git a/api/server.mjs b/api/server.mjs index 96582de..d020c1e 100644 --- a/api/server.mjs +++ b/api/server.mjs @@ -21,11 +21,12 @@ app.after(function(ctx) { if (ctx.status >= 400) { logger = ctx.log.warn } + console.log('') console.log({ path: ctx.url, status: ctx.status, ms: Math.round(ended), - }, 'Request finished') + }, 'Request finished') logger({ path: ctx.url, status: ctx.status, diff --git a/test/media/api.test.mjs b/test/media/api.test.mjs index d03c42c..ef94aba 100644 --- a/test/media/api.test.mjs +++ b/test/media/api.test.mjs @@ -41,11 +41,9 @@ t.describe('Media (API)', () => { assert.match(err.message, /[Mm]issing/) await new Promise(function(res) { - setTimeout(res, 100) + setTimeout(res, 10) }) - console.log(server.log.warn.firstCall) - console.log(server.log.warn.secondCall) assert.strictEqual(server.log.error.callCount, 0) assert.strictEqual(server.log.warn.callCount, 2) assert.strictEqual(typeof(server.log.warn.firstCall[0]), 'string') @@ -71,7 +69,7 @@ t.describe('Media (API)', () => { assert.match(err.message, /[Ii]nvalid/) await new Promise(function(res) { - setTimeout(res, 100) + setTimeout(res, 10) }) assert.strictEqual(server.log.error.callCount, 1)