aboutsummaryrefslogtreecommitdiffstats
path: root/packages/contracts/src/utils
diff options
context:
space:
mode:
authorAlex Browne <stephenalexbrowne@gmail.com>2018-06-06 07:56:16 +0800
committerAlex Browne <stephenalexbrowne@gmail.com>2018-06-07 03:41:14 +0800
commit167a38e27d09af12af6c59f1b486c835420fbac1 (patch)
tree6804d8fb26e77cba221e0212db8facdacca34c0d /packages/contracts/src/utils
parentba6806df5d2d4b31c125a0c58cc6cd65bf555933 (diff)
downloaddexon-sol-tools-167a38e27d09af12af6c59f1b486c835420fbac1.tar
dexon-sol-tools-167a38e27d09af12af6c59f1b486c835420fbac1.tar.gz
dexon-sol-tools-167a38e27d09af12af6c59f1b486c835420fbac1.tar.bz2
dexon-sol-tools-167a38e27d09af12af6c59f1b486c835420fbac1.tar.lz
dexon-sol-tools-167a38e27d09af12af6c59f1b486c835420fbac1.tar.xz
dexon-sol-tools-167a38e27d09af12af6c59f1b486c835420fbac1.tar.zst
dexon-sol-tools-167a38e27d09af12af6c59f1b486c835420fbac1.zip
Add Async suffix to relevant assertions
Diffstat (limited to 'packages/contracts/src/utils')
-rw-r--r--packages/contracts/src/utils/assertions.ts18
1 files changed, 9 insertions, 9 deletions
diff --git a/packages/contracts/src/utils/assertions.ts b/packages/contracts/src/utils/assertions.ts
index fc57f93fb..615e648f3 100644
--- a/packages/contracts/src/utils/assertions.ts
+++ b/packages/contracts/src/utils/assertions.ts
@@ -5,7 +5,7 @@ import { constants } from './constants';
const expect = chai.expect;
-function _expectEitherError<T>(p: Promise<T>, error1: string, error2: string): PromiseLike<void> {
+function _expectEitherErrorAsync<T>(p: Promise<T>, error1: string, error2: string): PromiseLike<void> {
return expect(p)
.to.be.rejected()
.then(e => {
@@ -24,8 +24,8 @@ function _expectEitherError<T>(p: Promise<T>, error1: string, error2: string): P
* @returns a new Promise which will reject if the conditions are not met and
* otherwise resolve with no value.
*/
-export function expectInsufficientFunds<T>(p: Promise<T>): PromiseLike<void> {
- return _expectEitherError(p, 'insufficient funds', "sender doesn't have enough funds");
+export function expectInsufficientFundsAsync<T>(p: Promise<T>): PromiseLike<void> {
+ return _expectEitherErrorAsync(p, 'insufficient funds', "sender doesn't have enough funds");
}
/**
@@ -36,8 +36,8 @@ export function expectInsufficientFunds<T>(p: Promise<T>): PromiseLike<void> {
* @returns a new Promise which will reject if the conditions are not met and
* otherwise resolve with no value.
*/
-export function expectRevertOrOtherError<T>(p: Promise<T>, otherError: string): PromiseLike<void> {
- return _expectEitherError(p, constants.REVERT, otherError);
+export function expectRevertOrOtherErrorAsync<T>(p: Promise<T>, otherError: string): PromiseLike<void> {
+ return _expectEitherErrorAsync(p, constants.REVERT, otherError);
}
/**
@@ -47,8 +47,8 @@ export function expectRevertOrOtherError<T>(p: Promise<T>, otherError: string):
* @returns a new Promise which will reject if the conditions are not met and
* otherwise resolve with no value.
*/
-export function expectRevertOrAlwaysFailingTransaction<T>(p: Promise<T>): PromiseLike<void> {
- return expectRevertOrOtherError(p, 'always failing transaction');
+export function expectRevertOrAlwaysFailingTransactionAsync<T>(p: Promise<T>): PromiseLike<void> {
+ return expectRevertOrOtherErrorAsync(p, 'always failing transaction');
}
/**
@@ -58,6 +58,6 @@ export function expectRevertOrAlwaysFailingTransaction<T>(p: Promise<T>): Promis
* @returns a new Promise which will reject if the conditions are not met and
* otherwise resolve with no value.
*/
-export function expectRevertOrContractCallFailed<T>(p: Promise<T>): PromiseLike<void> {
- return expectRevertOrOtherError<T>(p, 'Contract call failed');
+export function expectRevertOrContractCallFailedAsync<T>(p: Promise<T>): PromiseLike<void> {
+ return expectRevertOrOtherErrorAsync<T>(p, 'Contract call failed');
}