diff options
author | Leonid Logvinov <logvinov.leon@gmail.com> | 2018-12-13 07:54:00 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-12-13 07:54:00 +0800 |
commit | f9d436cd213a6d9800aa528c9bac5415230378f4 (patch) | |
tree | d6cf228c7a077fa43a440d23034211f305645bdb /contracts/test-utils/src/assertions.ts | |
parent | 78a6d236599857e2c9478b3c23a751101a6e233b (diff) | |
parent | 1534505652aa12a385dee46f876c22cc4ce8621a (diff) | |
download | dexon-sol-tools-f9d436cd213a6d9800aa528c9bac5415230378f4.tar dexon-sol-tools-f9d436cd213a6d9800aa528c9bac5415230378f4.tar.gz dexon-sol-tools-f9d436cd213a6d9800aa528c9bac5415230378f4.tar.bz2 dexon-sol-tools-f9d436cd213a6d9800aa528c9bac5415230378f4.tar.lz dexon-sol-tools-f9d436cd213a6d9800aa528c9bac5415230378f4.tar.xz dexon-sol-tools-f9d436cd213a6d9800aa528c9bac5415230378f4.tar.zst dexon-sol-tools-f9d436cd213a6d9800aa528c9bac5415230378f4.zip |
Merge pull request #1425 from 0xProject/feature/async-suffix
Check for an Async suffix in functions, not just methods.
Diffstat (limited to 'contracts/test-utils/src/assertions.ts')
-rw-r--r-- | contracts/test-utils/src/assertions.ts | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/contracts/test-utils/src/assertions.ts b/contracts/test-utils/src/assertions.ts index b1dec1281..f31651f4d 100644 --- a/contracts/test-utils/src/assertions.ts +++ b/contracts/test-utils/src/assertions.ts @@ -23,7 +23,7 @@ export type sendTransactionResult = Promise<TransactionReceipt | TransactionRece * @returns either the given ganacheError or gethError depending on the backing * node. */ -async function _getGanacheOrGethError(ganacheError: string, gethError: string): Promise<string> { +async function _getGanacheOrGethErrorAsync(ganacheError: string, gethError: string): Promise<string> { if (_.isUndefined(nodeType)) { nodeType = await web3Wrapper.getNodeTypeAsync(); } @@ -38,15 +38,15 @@ async function _getGanacheOrGethError(ganacheError: string, gethError: string): } async function _getInsufficientFundsErrorMessageAsync(): Promise<string> { - return _getGanacheOrGethError("sender doesn't have enough funds", 'insufficient funds'); + return _getGanacheOrGethErrorAsync("sender doesn't have enough funds", 'insufficient funds'); } async function _getTransactionFailedErrorMessageAsync(): Promise<string> { - return _getGanacheOrGethError('revert', 'always failing transaction'); + return _getGanacheOrGethErrorAsync('revert', 'always failing transaction'); } async function _getContractCallFailedErrorMessageAsync(): Promise<string> { - return _getGanacheOrGethError('revert', 'Contract call failed'); + return _getGanacheOrGethErrorAsync('revert', 'Contract call failed'); } /** @@ -54,7 +54,7 @@ async function _getContractCallFailedErrorMessageAsync(): Promise<string> { * contract call. The exact error message depends on the backing Ethereum node. */ export async function getInvalidOpcodeErrorMessageForCallAsync(): Promise<string> { - return _getGanacheOrGethError('invalid opcode', 'Contract call failed'); + return _getGanacheOrGethErrorAsync('invalid opcode', 'Contract call failed'); } /** @@ -65,7 +65,7 @@ export async function getInvalidOpcodeErrorMessageForCallAsync(): Promise<string * @returns the expected error message. */ export async function getRevertReasonOrErrorMessageForSendTransactionAsync(reason: RevertReason): Promise<string> { - return _getGanacheOrGethError(reason, 'always failing transaction'); + return _getGanacheOrGethErrorAsync(reason, 'always failing transaction'); } /** |