improve readability of async error tests

This commit is contained in:
xianny 2019-09-24 16:53:59 -07:00
parent 9b40164787
commit 44e5fa5b25

View File

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