diff options
author | Leonid <logvinov.leon@gmail.com> | 2017-06-06 21:57:22 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-06-06 21:57:22 +0800 |
commit | 8ec3bec5b3de726fbf2cc828e179ac2ed1029d9f (patch) | |
tree | f2d5bd81de95bd4be98a1c11e87910cbba18f283 | |
parent | 403ec236fffb0ed565e7c933d3608b554c007613 (diff) | |
parent | db5d59b06eadd7e48431dab5fdce3dda8c2fad54 (diff) | |
download | dexon-sol-tools-8ec3bec5b3de726fbf2cc828e179ac2ed1029d9f.tar dexon-sol-tools-8ec3bec5b3de726fbf2cc828e179ac2ed1029d9f.tar.gz dexon-sol-tools-8ec3bec5b3de726fbf2cc828e179ac2ed1029d9f.tar.bz2 dexon-sol-tools-8ec3bec5b3de726fbf2cc828e179ac2ed1029d9f.tar.lz dexon-sol-tools-8ec3bec5b3de726fbf2cc828e179ac2ed1029d9f.tar.xz dexon-sol-tools-8ec3bec5b3de726fbf2cc828e179ac2ed1029d9f.tar.zst dexon-sol-tools-8ec3bec5b3de726fbf2cc828e179ac2ed1029d9f.zip |
Merge pull request #41 from 0xProject/testFixes
Fix Test Failures
-rw-r--r-- | src/utils/assert.ts | 5 | ||||
-rw-r--r-- | test/assert_test.ts | 5 | ||||
-rw-r--r-- | test/exchange_wrapper_test.ts | 3 |
3 files changed, 8 insertions, 5 deletions
diff --git a/src/utils/assert.ts b/src/utils/assert.ts index f4d653ffb..4dc6945a2 100644 --- a/src/utils/assert.ts +++ b/src/utils/assert.ts @@ -34,8 +34,9 @@ export const assert = { async isSenderAddressAvailableAsync(web3Wrapper: Web3Wrapper, variableName: string, senderAddressHex: string): Promise<void> { const isSenderAddressAvailable = await web3Wrapper.isSenderAddressAvailableAsync(senderAddressHex); - assert.assert(isSenderAddressAvailable, `Specified ${variableName} ${senderAddressHex} isn't available \ - through the supplied web3 instance`); + assert.assert(isSenderAddressAvailable, + `Specified ${variableName} ${senderAddressHex} isn't available through the supplied web3 instance`, + ); }, async isUserAddressAvailableAsync(web3Wrapper: Web3Wrapper): Promise<void> { const availableAddresses = await web3Wrapper.getAvailableAddressesAsync(); diff --git a/test/assert_test.ts b/test/assert_test.ts index 560ef06d4..6b623eaad 100644 --- a/test/assert_test.ts +++ b/test/assert_test.ts @@ -20,8 +20,9 @@ describe('Assertion library', () => { const validUnrelatedAddress = '0x8b0292b11a196601eddce54b665cafeca0347d42'; const varName = 'address'; return expect(assert.isSenderAddressAsync(varName, validUnrelatedAddress, (zeroEx as any).web3Wrapper)) - .to.be.rejectedWith(`Specified ${varName} ${validUnrelatedAddress} \ - isn't available through the supplied web3 instance`); + .to.be.rejectedWith( + `Specified ${varName} ${validUnrelatedAddress} isn't available through the supplied web3 instance`, + ); }); it('doesn\'t throw if address is available', async () => { const availableAddress = (await zeroEx.getAvailableAddressesAsync())[0]; diff --git a/test/exchange_wrapper_test.ts b/test/exchange_wrapper_test.ts index e4b0d47f7..370e741b4 100644 --- a/test/exchange_wrapper_test.ts +++ b/test/exchange_wrapper_test.ts @@ -152,8 +152,9 @@ describe('ExchangeWrapper', () => { const signedOrder = await fillScenarios.createFillableSignedOrderAsync( makerTokenAddress, takerTokenAddress, makerAddress, takerAddress, fillableAmount, ); + const nonExistentSenderAddress = userAddresses[6]; return expect(zeroEx.exchange.fillOrderAsync( - signedOrder, fillTakerAmount, shouldCheckTransfer, takerAddress, + signedOrder, fillTakerAmount, shouldCheckTransfer, nonExistentSenderAddress, )).to.be.rejectedWith(ExchangeContractErrs.TRANSACTION_SENDER_IS_NOT_FILL_ORDER_TAKER); }); it('should throw when order is expired', async () => { |