From eefc8ca7ecb0543da3dad54ad1146eacb5a446f6 Mon Sep 17 00:00:00 2001 From: Fabio Berger Date: Tue, 30 May 2017 12:53:42 +0200 Subject: add assertions that contractInstances are not undefined before provider update --- test/0x.js_test.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/test/0x.js_test.ts b/test/0x.js_test.ts index 21e4b5a3b..041c5b433 100644 --- a/test/0x.js_test.ts +++ b/test/0x.js_test.ts @@ -20,6 +20,8 @@ describe('ZeroEx library', () => { // Instantiate the contract instances with the current provider await (zeroEx.exchange as any).instantiateExchangeContractIfDoesntExistAsync(); await (zeroEx.tokenRegistry as any).instantiateTokenRegistryContractIfDoesntExistAsync(); + expect((zeroEx.exchange as any).exchangeContractIfExists).to.not.be.an('undefined'); + expect((zeroEx.tokenRegistry as any).tokenRegistryContractIfExists).to.not.be.an('undefined'); const newProvider = web3Factory.getRpcProvider(); // Add property to newProvider so that we can differentiate it from old provider -- cgit