diff --git a/.circleci/config.yml b/.circleci/config.yml index a8e81e8..78c1ed9 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -17,7 +17,7 @@ jobs: - run: name: Run tests command: | - npm run test:linux -- -r list + npm run test:linux # - deploy: # name: Push to docker # command: | diff --git a/api/server.mjs b/api/server.mjs index d020c1e..b75db6c 100644 --- a/api/server.mjs +++ b/api/server.mjs @@ -20,13 +20,7 @@ app.after(function(ctx) { let logger = ctx.log.info if (ctx.status >= 400) { logger = ctx.log.warn - } - console.log('') - console.log({ - path: ctx.url, - status: ctx.status, - ms: Math.round(ended), - }, 'Request finished') + } logger({ path: ctx.url, status: ctx.status, diff --git a/test/media/api.test.mjs b/test/media/api.test.mjs index ef94aba..0d6f901 100644 --- a/test/media/api.test.mjs +++ b/test/media/api.test.mjs @@ -40,10 +40,6 @@ t.describe('Media (API)', () => { assert.match(err.message, /[Tt]oken/) assert.match(err.message, /[Mm]issing/) - await new Promise(function(res) { - setTimeout(res, 10) - }) - assert.strictEqual(server.log.error.callCount, 0) assert.strictEqual(server.log.warn.callCount, 2) assert.strictEqual(typeof(server.log.warn.firstCall[0]), 'string') @@ -67,10 +63,6 @@ t.describe('Media (API)', () => { assert.strictEqual(err.status, 422) assert.match(err.message, /[Tt]oken/) assert.match(err.message, /[Ii]nvalid/) - - await new Promise(function(res) { - setTimeout(res, 10) - }) assert.strictEqual(server.log.error.callCount, 1) assert.strictEqual(server.log.warn.callCount, 2)