really fix async error tests

This commit is contained in:
xianny
2019-09-24 16:45:24 -07:00
parent 893ae35296
commit 52e8cf1366

View File

@@ -81,28 +81,28 @@ describe('AbiGenDummy Contract', () => {
describe('simpleRevert', () => {
it('should call simpleRevert', async () => {
expect(abiGenDummy.simpleRevert.callAsync())
.to.be.rejectedWith(StringRevertError)
.to.eventually.be.rejectedWith(StringRevertError)
.deep.equal(new StringRevertError('SIMPLE_REVERT'));
});
});
describe('revertWithConstant', () => {
it('should call revertWithConstant', async () => {
expect(abiGenDummy.simpleRevert.callAsync())
.to.be.rejectedWith(StringRevertError)
expect(abiGenDummy.revertWithConstant.callAsync())
.to.eventually.be.rejectedWith(StringRevertError)
.deep.equal(new StringRevertError('REVERT_WITH_CONSTANT'));
});
});
describe('simpleRequire', () => {
it('should call simpleRequire', async () => {
expect(abiGenDummy.simpleRevert.callAsync())
.to.be.rejectedWith(StringRevertError)
expect(abiGenDummy.simpleRequire.callAsync())
.to.eventually.be.rejectedWith(StringRevertError)
.deep.equal(new StringRevertError('SIMPLE_REQUIRE'));
});
});
describe('requireWithConstant', () => {
it('should call requireWithConstant', async () => {
expect(abiGenDummy.simpleRevert.callAsync())
.to.be.rejectedWith(StringRevertError)
expect(abiGenDummy.requireWithConstant.callAsync())
.to.eventually.be.rejectedWith(StringRevertError)
.deep.equal(new StringRevertError('REQUIRE_WITH_CONSTANT'));
});
});