cleanup debug code and last of circleci bugs

dev
Jonatan Nilsson 2021-10-11 02:21:20 +00:00
parent 0a2e9fdfc4
commit 799c4419dc
3 changed files with 2 additions and 16 deletions

View File

@ -17,7 +17,7 @@ jobs:
- run: - run:
name: Run tests name: Run tests
command: | command: |
npm run test:linux -- -r list npm run test:linux
# - deploy: # - deploy:
# name: Push to docker # name: Push to docker
# command: | # command: |

View File

@ -20,13 +20,7 @@ app.after(function(ctx) {
let logger = ctx.log.info let logger = ctx.log.info
if (ctx.status >= 400) { if (ctx.status >= 400) {
logger = ctx.log.warn logger = ctx.log.warn
} }
console.log('')
console.log({
path: ctx.url,
status: ctx.status,
ms: Math.round(ended),
}, 'Request finished')
logger({ logger({
path: ctx.url, path: ctx.url,
status: ctx.status, status: ctx.status,

View File

@ -40,10 +40,6 @@ t.describe('Media (API)', () => {
assert.match(err.message, /[Tt]oken/) assert.match(err.message, /[Tt]oken/)
assert.match(err.message, /[Mm]issing/) 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.error.callCount, 0)
assert.strictEqual(server.log.warn.callCount, 2) assert.strictEqual(server.log.warn.callCount, 2)
assert.strictEqual(typeof(server.log.warn.firstCall[0]), 'string') assert.strictEqual(typeof(server.log.warn.firstCall[0]), 'string')
@ -67,10 +63,6 @@ t.describe('Media (API)', () => {
assert.strictEqual(err.status, 422) assert.strictEqual(err.status, 422)
assert.match(err.message, /[Tt]oken/) assert.match(err.message, /[Tt]oken/)
assert.match(err.message, /[Ii]nvalid/) 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.error.callCount, 1)
assert.strictEqual(server.log.warn.callCount, 2) assert.strictEqual(server.log.warn.callCount, 2)