Skip to content

Commit

Permalink
Await asynchronous expect assertions (#4334)
Browse files Browse the repository at this point in the history
  • Loading branch information
nickrum committed Mar 2, 2021
1 parent 3e6176a commit c1ab23c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion test/integration/query/inserts.js
Original file line number Diff line number Diff line change
Expand Up @@ -798,7 +798,7 @@ module.exports = function (knex) {
});

it('should throw an error if the array passed in is empty', async function () {
expect(knex('account').insert([])).to.be.rejectedWith(
await expect(knex('account').insert([])).to.be.rejectedWith(
Error,
'The query is empty'
);
Expand Down
2 changes: 1 addition & 1 deletion test/unit/migrations/util/fs.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ describe('FS functions', () => {
const directoryThatExists = await createTemp();
const unexistingPath = path.join(directoryThatExists, 'abc/xyz/123');

expect(stat(unexistingPath)).to.eventually.be.rejected;
await expect(stat(unexistingPath)).to.eventually.be.rejected;
});
});

Expand Down

0 comments on commit c1ab23c

Please sign in to comment.