diff options
author | Brandon Millman <brandon.millman@gmail.com> | 2018-01-09 10:02:41 +0800 |
---|---|---|
committer | Brandon Millman <brandon.millman@gmail.com> | 2018-01-09 10:02:41 +0800 |
commit | 8019b1b8231cac24dfc6aa3bb2d5115eff11ee89 (patch) | |
tree | d270d71404bd3aab44c79dcadf16e348614e9214 /packages/0x.js/test/assert_test.ts | |
parent | 8fe81c9d090ce50496f3150602f19433e7aedd1e (diff) | |
parent | 7a56e83fa3ca02d796deba3359da480834a9f6ea (diff) | |
download | dexon-sol-tools-8019b1b8231cac24dfc6aa3bb2d5115eff11ee89.tar dexon-sol-tools-8019b1b8231cac24dfc6aa3bb2d5115eff11ee89.tar.gz dexon-sol-tools-8019b1b8231cac24dfc6aa3bb2d5115eff11ee89.tar.bz2 dexon-sol-tools-8019b1b8231cac24dfc6aa3bb2d5115eff11ee89.tar.lz dexon-sol-tools-8019b1b8231cac24dfc6aa3bb2d5115eff11ee89.tar.xz dexon-sol-tools-8019b1b8231cac24dfc6aa3bb2d5115eff11ee89.tar.zst dexon-sol-tools-8019b1b8231cac24dfc6aa3bb2d5115eff11ee89.zip |
Merge branch 'development' into refactor/httpClientJsonParsing
* development: (21 commits)
Update connect CHANGELOG
Changes to abi-gen after code review
Added constructor ABIs to abi-gen
Describe #295 in a CHANGELOG
Add #302 description to changelog
Fix formatting
Apply prettier config
Install prettier
Remove formatting esilnt rules
sendTransactionAsync should return txHash string
Added Event generation to abi-gen
Publish
Add dates to CHANGELOG entries
Update subproviders CHANGELOG
Support both personal_sign and eth_sign
Fix Ledger tests given change from `personal_sign` to `eth_sign`
Update subprovider to catch correct RPC method
Rename guide
Update contribution guide
Fix broken links in the abi-gen README
...
Diffstat (limited to 'packages/0x.js/test/assert_test.ts')
-rw-r--r-- | packages/0x.js/test/assert_test.ts | 29 |
1 files changed, 16 insertions, 13 deletions
diff --git a/packages/0x.js/test/assert_test.ts b/packages/0x.js/test/assert_test.ts index 9fa7f780f..1f2820070 100644 --- a/packages/0x.js/test/assert_test.ts +++ b/packages/0x.js/test/assert_test.ts @@ -1,11 +1,11 @@ import * as chai from 'chai'; import 'mocha'; -import {ZeroEx} from '../src'; -import {assert} from '../src/utils/assert'; +import { ZeroEx } from '../src'; +import { assert } from '../src/utils/assert'; -import {constants} from './utils/constants'; -import {web3Factory} from './utils/web3_factory'; +import { constants } from './utils/constants'; +import { web3Factory } from './utils/web3_factory'; const expect = chai.expect; @@ -19,22 +19,25 @@ describe('Assertion library', () => { it('throws when address is invalid', async () => { const address = '0xdeadbeef'; const varName = 'address'; - return expect(assert.isSenderAddressAsync(varName, address, (zeroEx as any)._web3Wrapper)) - .to.be.rejectedWith(`Expected ${varName} to be of type ETHAddressHex, encountered: ${address}`); + return expect( + assert.isSenderAddressAsync(varName, address, (zeroEx as any)._web3Wrapper), + ).to.be.rejectedWith(`Expected ${varName} to be of type ETHAddressHex, encountered: ${address}`); }); it('throws when address is unavailable', async () => { 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 provider`, - ); + return expect( + assert.isSenderAddressAsync(varName, validUnrelatedAddress, (zeroEx as any)._web3Wrapper), + ).to.be.rejectedWith( + `Specified ${varName} ${validUnrelatedAddress} isn't available through the supplied web3 provider`, + ); }); - it('doesn\'t throw if address is available', async () => { + it("doesn't throw if address is available", async () => { const availableAddress = (await zeroEx.getAvailableAddressesAsync())[0]; const varName = 'address'; - return expect(assert.isSenderAddressAsync(varName, availableAddress, (zeroEx as any)._web3Wrapper)) - .to.become(undefined); + return expect( + assert.isSenderAddressAsync(varName, availableAddress, (zeroEx as any)._web3Wrapper), + ).to.become(undefined); }); }); }); |