more debug code for circleci
This commit is contained in:
parent
d601ce169d
commit
36c45c9353
2 changed files with 7 additions and 6 deletions
|
@ -16,16 +16,16 @@ app.before(function(ctx) {
|
|||
})
|
||||
|
||||
app.after(function(ctx) {
|
||||
console.log({
|
||||
path: ctx.url,
|
||||
status: ctx.status,
|
||||
ms: Math.round(ended),
|
||||
}, 'Request finished')
|
||||
let ended = performance.now() - ctx.__started
|
||||
let logger = ctx.log.info
|
||||
if (ctx.status >= 400) {
|
||||
logger = ctx.log.warn
|
||||
}
|
||||
console.log({
|
||||
path: ctx.url,
|
||||
status: ctx.status,
|
||||
ms: Math.round(ended),
|
||||
}, 'Request finished')
|
||||
logger({
|
||||
path: ctx.url,
|
||||
status: ctx.status,
|
||||
|
|
|
@ -44,7 +44,8 @@ t.describe('Media (API)', () => {
|
|||
setTimeout(res, 100)
|
||||
})
|
||||
|
||||
console.log(server.log.warn)
|
||||
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')
|
||||
|
|
Loading…
Reference in a new issue