diff options
author | Leonid Logvinov <logvinov.leon@gmail.com> | 2017-06-30 01:34:49 +0800 |
---|---|---|
committer | Leonid Logvinov <logvinov.leon@gmail.com> | 2017-06-30 01:34:49 +0800 |
commit | e9db5327278c8015f8e091ae8de6e6cf95caa126 (patch) | |
tree | 645974e07e573399d8f739813acd67e17423fcae /test | |
parent | dd590ca79eb0fc17ea29286c1cb638745c6c62d4 (diff) | |
download | dexon-sol-tools-e9db5327278c8015f8e091ae8de6e6cf95caa126.tar dexon-sol-tools-e9db5327278c8015f8e091ae8de6e6cf95caa126.tar.gz dexon-sol-tools-e9db5327278c8015f8e091ae8de6e6cf95caa126.tar.bz2 dexon-sol-tools-e9db5327278c8015f8e091ae8de6e6cf95caa126.tar.lz dexon-sol-tools-e9db5327278c8015f8e091ae8de6e6cf95caa126.tar.xz dexon-sol-tools-e9db5327278c8015f8e091ae8de6e6cf95caa126.tar.zst dexon-sol-tools-e9db5327278c8015f8e091ae8de6e6cf95caa126.zip |
Make getOrderHashHex a non-async function
Diffstat (limited to 'test')
-rw-r--r-- | test/0x.js_test.ts | 15 |
1 files changed, 2 insertions, 13 deletions
diff --git a/test/0x.js_test.ts b/test/0x.js_test.ts index 3ddb5db1d..f4d13886b 100644 --- a/test/0x.js_test.ts +++ b/test/0x.js_test.ts @@ -130,7 +130,7 @@ describe('ZeroEx library', () => { expect(baseUnitAmount).to.be.bignumber.equal(expectedUnitAmount); }); }); - describe('#getOrderHashHexAsync', () => { + describe('#getOrderHashHex', () => { const expectedOrderHash = '0x39da987067a3c9e5f1617694f1301326ba8c8b0498ebef5df4863bed394e3c83'; const exchangeContractAddress = '0xb69e673309512a9d726f87304c6984054f87a93b'; const order: Order = { @@ -147,22 +147,11 @@ describe('ZeroEx library', () => { takerTokenAmount: new BigNumber(0), expirationUnixTimestampSec: new BigNumber(0), }; - let stubs: Sinon.SinonStub[] = []; - afterEach(() => { - // clean up any stubs after the test has completed - _.each(stubs, s => s.restore()); - stubs = []; - }); it('calculates the order hash', async () => { const web3 = web3Factory.create(); const zeroEx = new ZeroEx(web3.currentProvider); - stubs = [ - Sinon.stub((zeroEx as any), '_getExchangeAddressAsync') - .returns(Promise.resolve(exchangeContractAddress)), - ]; - - const orderHash = await zeroEx.getOrderHashHexAsync(order); + const orderHash = zeroEx.getOrderHashHex(order); expect(orderHash).to.be.equal(expectedOrderHash); }); }); |