aboutsummaryrefslogtreecommitdiffstats
path: root/packages/0x.js/test/assert_test.ts
diff options
context:
space:
mode:
authorLeonid Logvinov <logvinov.leon@gmail.com>2017-12-22 22:05:32 +0800
committerLeonid Logvinov <logvinov.leon@gmail.com>2018-01-03 18:37:38 +0800
commite744e4cd989bd3ae1070c59f7baa8097f18b8b06 (patch)
treea7fde03873f3c1b8689d3991edbb362f8022e5f0 /packages/0x.js/test/assert_test.ts
parent9a96e8c704b6f84e00bbe848159a4819844cf09d (diff)
downloaddexon-sol-tools-e744e4cd989bd3ae1070c59f7baa8097f18b8b06.tar
dexon-sol-tools-e744e4cd989bd3ae1070c59f7baa8097f18b8b06.tar.gz
dexon-sol-tools-e744e4cd989bd3ae1070c59f7baa8097f18b8b06.tar.bz2
dexon-sol-tools-e744e4cd989bd3ae1070c59f7baa8097f18b8b06.tar.lz
dexon-sol-tools-e744e4cd989bd3ae1070c59f7baa8097f18b8b06.tar.xz
dexon-sol-tools-e744e4cd989bd3ae1070c59f7baa8097f18b8b06.tar.zst
dexon-sol-tools-e744e4cd989bd3ae1070c59f7baa8097f18b8b06.zip
Apply prettier config
Diffstat (limited to 'packages/0x.js/test/assert_test.ts')
-rw-r--r--packages/0x.js/test/assert_test.ts29
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);
});
});
});