add slight debug stuff to figure out why circleci tests are failing
This commit is contained in:
parent
9823f80721
commit
d601ce169d
3 changed files with 9 additions and 2 deletions
|
@ -13,6 +13,7 @@ jobs:
|
|||
name: Install dependencies
|
||||
command: |
|
||||
npm install
|
||||
npm list --all
|
||||
- run:
|
||||
name: Run tests
|
||||
command: |
|
||||
|
|
|
@ -16,6 +16,11 @@ 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) {
|
||||
|
|
|
@ -41,9 +41,10 @@ t.describe('Media (API)', () => {
|
|||
assert.match(err.message, /[Mm]issing/)
|
||||
|
||||
await new Promise(function(res) {
|
||||
setTimeout(res, 10)
|
||||
setTimeout(res, 100)
|
||||
})
|
||||
|
||||
console.log(server.log.warn)
|
||||
assert.strictEqual(server.log.error.callCount, 0)
|
||||
assert.strictEqual(server.log.warn.callCount, 2)
|
||||
assert.strictEqual(typeof(server.log.warn.firstCall[0]), 'string')
|
||||
|
@ -69,7 +70,7 @@ t.describe('Media (API)', () => {
|
|||
assert.match(err.message, /[Ii]nvalid/)
|
||||
|
||||
await new Promise(function(res) {
|
||||
setTimeout(res, 10)
|
||||
setTimeout(res, 100)
|
||||
})
|
||||
|
||||
assert.strictEqual(server.log.error.callCount, 1)
|
||||
|
|
Loading…
Reference in a new issue