Skip to content

Commit

Permalink
[Tests] improve some failure output by adding messages
Browse files Browse the repository at this point in the history
  • Loading branch information
ljharb committed Dec 29, 2019
1 parent 1a59e0b commit bd76254
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
6 changes: 3 additions & 3 deletions test/async-await.js
Expand Up @@ -122,9 +122,9 @@ tap.test('async5', function (t) {
'ok 2 after server',
'ok 3 before request',
'ok 4 after request',
'ok 5 should be equal',
'ok 6 should be equal',
'ok 7 undefined',
'ok 5 res.statusCode is 200',
'ok 6 mockDb.state is new',
'ok 7 error on close',
'not ok 8 .end() called twice',
' ---',
' operator: fail',
Expand Down
8 changes: 4 additions & 4 deletions test/async-await/async5.js
Expand Up @@ -40,18 +40,18 @@ test('async5', async function myTest(t) {
t.ok(true, 'after request');

res.resume();
t.equal(res.statusCode, 200);
t.equal(res.statusCode, 200, 'res.statusCode is 200');

setTimeout(function () {
t.equal(mockDb.state, 'new');
t.equal(mockDb.state, 'new', 'mockDb.state is new');

server.close(function (err) {
t.ifError(err);
t.ifError(err, 'error on close');
t.end();
});
}, 50);
} catch (err) {
t.ifError(err);
t.ifError(err, 'error in catch');
t.end();
}
});

0 comments on commit bd76254

Please sign in to comment.