Skip to content

Commit

Permalink
improve message of failing test
Browse files Browse the repository at this point in the history
  • Loading branch information
jscheffner committed Apr 11, 2020
1 parent 212423e commit 3dfd3d2
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions test/index.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,13 @@ test('provide causes of failing strategies', async (t) => {
});

request(server);
const err = await listener;
const errors = await listener;

t.log(err);
t.true(err instanceof AggregateError);
t.true(isBoom(err));
t.is([...err].length, 4);
t.true([...err].every(isBoom));
t.log(errors);
t.true(errors instanceof AggregateError);
t.true(isBoom(errors));
t.is([...errors].length, 4);
[...errors].forEach(err => t.true(isBoom(err), `${err.strategy} should result in a boom error.`));
});

test('succeed if all succeed', async (t) => {
Expand Down

0 comments on commit 3dfd3d2

Please sign in to comment.