diff options
author | Leonid Logvinov <logvinov.leon@gmail.com> | 2017-11-13 01:53:03 +0800 |
---|---|---|
committer | Leonid Logvinov <logvinov.leon@gmail.com> | 2017-11-13 09:06:13 +0800 |
commit | f5608d2c94bcee05a76ef102f235f5e860820567 (patch) | |
tree | 5749dd899f803e4f2357d60cf038a607b1852759 /test | |
parent | bcad937003fa925878d34e5fa83e5a89369d0957 (diff) | |
download | dexon-sol-tools-f5608d2c94bcee05a76ef102f235f5e860820567.tar dexon-sol-tools-f5608d2c94bcee05a76ef102f235f5e860820567.tar.gz dexon-sol-tools-f5608d2c94bcee05a76ef102f235f5e860820567.tar.bz2 dexon-sol-tools-f5608d2c94bcee05a76ef102f235f5e860820567.tar.lz dexon-sol-tools-f5608d2c94bcee05a76ef102f235f5e860820567.tar.xz dexon-sol-tools-f5608d2c94bcee05a76ef102f235f5e860820567.tar.zst dexon-sol-tools-f5608d2c94bcee05a76ef102f235f5e860820567.zip |
Pass blockStore to eventWatcher
Diffstat (limited to 'test')
-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) => { |