You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Nov 7, 2019. It is now read-only.
The assertRevert function uses chai assertions, and does not block test success until the promise resolves, forcing the user to add a delay after the assertion.
The following expectRevert blocks jest tests until the promise returned by fn resolves, which is far superior:
async function expectRevert(fn, msg) {
expect.assertions(1);
await expect(fn()).rejects.toThrowError(msg);
}