Merge branch 'refactor/check-revert-reasons' into feature/combinatorial-testing
* refactor/check-revert-reasons: Temporarily switch revert reasons to `TransferFailed`. Should be `InvalidAmount` but because of an oversight in the assembly implementation of `dispatchTransferFrom`, it always throws `TransferFailed` Expect RevertReason be passed in, not string Rename RevertReasons to RevertReason since singular enum names are more common # Conflicts: # packages/contracts/test/asset_proxy/proxies.ts # packages/contracts/test/exchange/core.ts
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user