diff options
author | Fabio Berger <me@fabioberger.com> | 2018-06-26 14:11:32 +0800 |
---|---|---|
committer | Fabio Berger <me@fabioberger.com> | 2018-06-26 14:11:32 +0800 |
commit | f780e6f235be0216eb37dbbdc148a9c19521cbaf (patch) | |
tree | bc8d053e0038afc5c27fcbdc3e01b2c25cb79474 /packages | |
parent | 27670f4da679f5dbd3a3b399f14ba437184d2633 (diff) | |
download | dexon-0x-contracts-f780e6f235be0216eb37dbbdc148a9c19521cbaf.tar.gz dexon-0x-contracts-f780e6f235be0216eb37dbbdc148a9c19521cbaf.tar.zst dexon-0x-contracts-f780e6f235be0216eb37dbbdc148a9c19521cbaf.zip |
Expect RevertReason be passed in, not string
Diffstat (limited to 'packages')
-rw-r--r-- | packages/contracts/src/utils/assertions.ts | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/packages/contracts/src/utils/assertions.ts b/packages/contracts/src/utils/assertions.ts index 29489e648..e702a3200 100644 --- a/packages/contracts/src/utils/assertions.ts +++ b/packages/contracts/src/utils/assertions.ts @@ -1,3 +1,4 @@ +import { RevertReason } from '@0xproject/types'; import * as chai from 'chai'; import * as _ from 'lodash'; @@ -59,7 +60,10 @@ export function expectRevertOrAlwaysFailingTransactionAsync<T>(p: Promise<T>): P * @returns a new Promise which will reject if the conditions are not met and * otherwise resolve with no value. */ -export function expectRevertReasonOrAlwaysFailingTransactionAsync<T>(p: Promise<T>, reason: string): PromiseLike<void> { +export function expectRevertReasonOrAlwaysFailingTransactionAsync<T>( + p: Promise<T>, + reason: RevertReason, +): PromiseLike<void> { return _expectEitherErrorAsync(p, 'always failing transaction', reason); } |