trufflesuite / drizzle

Reactive Ethereum dapp UI suite
905 stars 235 forks source link

Unnecessary contractCreatorSpy in tests #34

Open SeanJCasey opened 5 years ago

SeanJCasey commented 5 years ago

There's an unnecessary contractCreatorSpy used to instantiate drizzle.web3 in api.test.js and middleware.test.js

E.g., in api.test.js line 28-32:

    // Create Drizzle and simulate web3 resolution
    contractCreatorSpy = jest.fn()
    let mockedWeb3 = { eth: { Contract: contractCreatorSpy } }
    drizzle = new Drizzle(drizzleOptions, mockedStore)
    drizzle.web3 = mockedWeb3