more debug code for circleci
This commit is contained in:
parent
ce1e357079
commit
4780813d3d
2 changed files with 4 additions and 5 deletions
|
@ -21,11 +21,12 @@ app.after(function(ctx) {
|
||||||
if (ctx.status >= 400) {
|
if (ctx.status >= 400) {
|
||||||
logger = ctx.log.warn
|
logger = ctx.log.warn
|
||||||
}
|
}
|
||||||
|
console.log('')
|
||||||
console.log({
|
console.log({
|
||||||
path: ctx.url,
|
path: ctx.url,
|
||||||
status: ctx.status,
|
status: ctx.status,
|
||||||
ms: Math.round(ended),
|
ms: Math.round(ended),
|
||||||
}, 'Request finished')
|
}, 'Request finished')
|
||||||
logger({
|
logger({
|
||||||
path: ctx.url,
|
path: ctx.url,
|
||||||
status: ctx.status,
|
status: ctx.status,
|
||||||
|
|
|
@ -41,11 +41,9 @@ t.describe('Media (API)', () => {
|
||||||
assert.match(err.message, /[Mm]issing/)
|
assert.match(err.message, /[Mm]issing/)
|
||||||
|
|
||||||
await new Promise(function(res) {
|
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.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')
|
||||||
|
@ -71,7 +69,7 @@ t.describe('Media (API)', () => {
|
||||||
assert.match(err.message, /[Ii]nvalid/)
|
assert.match(err.message, /[Ii]nvalid/)
|
||||||
|
|
||||||
await new Promise(function(res) {
|
await new Promise(function(res) {
|
||||||
setTimeout(res, 100)
|
setTimeout(res, 10)
|
||||||
})
|
})
|
||||||
|
|
||||||
assert.strictEqual(server.log.error.callCount, 1)
|
assert.strictEqual(server.log.error.callCount, 1)
|
||||||
|
|
Loading…
Reference in a new issue