From f780e6f235be0216eb37dbbdc148a9c19521cbaf Mon Sep 17 00:00:00 2001 From: Fabio Berger Date: Tue, 26 Jun 2018 08:11:32 +0200 Subject: Expect RevertReason be passed in, not string --- packages/contracts/src/utils/assertions.ts | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) 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(p: Promise): P * @returns a new Promise which will reject if the conditions are not met and * otherwise resolve with no value. */ -export function expectRevertReasonOrAlwaysFailingTransactionAsync(p: Promise, reason: string): PromiseLike { +export function expectRevertReasonOrAlwaysFailingTransactionAsync( + p: Promise, + reason: RevertReason, +): PromiseLike { return _expectEitherErrorAsync(p, 'always failing transaction', reason); } -- cgit