diff options
Diffstat (limited to 'test/event_watcher_test.ts')
-rw-r--r-- | test/event_watcher_test.ts | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/test/event_watcher_test.ts b/test/event_watcher_test.ts index 98dab93b5..0a1e7eb63 100644 --- a/test/event_watcher_test.ts +++ b/test/event_watcher_test.ts @@ -8,6 +8,7 @@ import {chaiSetup} from './utils/chai_setup'; import {web3Factory} from './utils/web3_factory'; import {Web3Wrapper} from '../src/web3_wrapper'; import {EventWatcher} from '../src/order_watcher/event_watcher'; +import {BlockStore} from '../src/stores/block_store'; import { ZeroEx, LogEvent, @@ -23,6 +24,7 @@ describe('EventWatcher', () => { let stubs: Sinon.SinonStub[] = []; let eventWatcher: EventWatcher; let web3Wrapper: Web3Wrapper; + let blockStore: BlockStore; const numConfirmations = 0; const logA: Web3.LogEntry = { address: '0x71d271f8b14adef568f8f28f1587ce7271ac4ca5', @@ -58,12 +60,15 @@ describe('EventWatcher', () => { web3 = web3Factory.create(); const pollingIntervalMs = 10; web3Wrapper = new Web3Wrapper(web3.currentProvider); - eventWatcher = new EventWatcher(web3Wrapper, pollingIntervalMs, numConfirmations); + blockStore = new BlockStore(); + await blockStore.startAsync(); + eventWatcher = new EventWatcher(web3Wrapper, blockStore, pollingIntervalMs, numConfirmations); }); afterEach(() => { // clean up any stubs after the test has completed _.each(stubs, s => s.restore()); stubs = []; + blockStore.stop(); eventWatcher.unsubscribe(); }); it('correctly emits initial log events', (done: DoneCallback) => { |