Skip to content

Commit

Permalink
Imrpoved code style for a unit test
Browse files Browse the repository at this point in the history
Co-authored-by: dblythy <daniel-blyth@live.com.au>
  • Loading branch information
vzukanov and dblythy authored Sep 13, 2022
1 parent 562c713 commit 52b4a69
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions spec/index.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -462,11 +462,8 @@ describe('server', () => {
.then(done);
});

it('fails if default limit is negative', done => {
reconfigureServer({ defaultLimit: -1 }).catch(error => {
expect(error).toEqual('Default limit must be a value greater than 0.');
done();
});
it('fails if default limit is negative', async () => {
await expectAsync(reconfigureServer({ defaultLimit: -1 })).toBeRejectedWith('Default limit must be a value greater than 0.'));
});

it('fails if default limit is zero', done => {
Expand Down

0 comments on commit 52b4a69

Please sign in to comment.