aboutsummaryrefslogtreecommitdiffstats
path: root/test/unit/network-contoller-test.js
diff options
context:
space:
mode:
authorkumavis <aaron@kumavis.me>2017-10-11 08:26:44 +0800
committerkumavis <aaron@kumavis.me>2017-10-11 08:26:44 +0800
commit0f8d7dacb1bada269f38b3f0f73df9e8347bc492 (patch)
tree18df8aa42bd4f3a5e599956874e52c97ae14ba42 /test/unit/network-contoller-test.js
parent7d50a56198f2992e908bc97b871210ec2b52123a (diff)
downloadtangerine-wallet-browser-0f8d7dacb1bada269f38b3f0f73df9e8347bc492.tar
tangerine-wallet-browser-0f8d7dacb1bada269f38b3f0f73df9e8347bc492.tar.gz
tangerine-wallet-browser-0f8d7dacb1bada269f38b3f0f73df9e8347bc492.tar.bz2
tangerine-wallet-browser-0f8d7dacb1bada269f38b3f0f73df9e8347bc492.tar.lz
tangerine-wallet-browser-0f8d7dacb1bada269f38b3f0f73df9e8347bc492.tar.xz
tangerine-wallet-browser-0f8d7dacb1bada269f38b3f0f73df9e8347bc492.tar.zst
tangerine-wallet-browser-0f8d7dacb1bada269f38b3f0f73df9e8347bc492.zip
network-controller - use obj-proxy for providerProxy
Diffstat (limited to 'test/unit/network-contoller-test.js')
-rw-r--r--test/unit/network-contoller-test.js25
1 files changed, 5 insertions, 20 deletions
diff --git a/test/unit/network-contoller-test.js b/test/unit/network-contoller-test.js
index 0b3b5adeb..42ca40c56 100644
--- a/test/unit/network-contoller-test.js
+++ b/test/unit/network-contoller-test.js
@@ -14,15 +14,15 @@ describe('# Network Controller', function () {
},
})
- networkController.initializeProvider(networkControllerProviderInit, dummyProviderConstructor)
+ networkController.initializeProvider(networkControllerProviderInit)
})
describe('network', function () {
describe('#provider', function () {
it('provider should be updatable without reassignment', function () {
- networkController.initializeProvider(networkControllerProviderInit, dummyProviderConstructor)
- const proxy = networkController._proxy
- proxy.setTarget({ test: true, on: () => {} })
- assert.ok(proxy.test)
+ networkController.initializeProvider(networkControllerProviderInit)
+ const providerProxy = networkController.providerProxy
+ providerProxy.setTarget({ test: true })
+ assert.ok(providerProxy.test)
})
})
describe('#getNetworkState', function () {
@@ -66,19 +66,4 @@ describe('# Network Controller', function () {
})
})
-function dummyProviderConstructor() {
- return {
- // provider
- sendAsync: noop,
- // block tracker
- _blockTracker: {},
- start: noop,
- stop: noop,
- on: noop,
- addListener: noop,
- once: noop,
- removeAllListeners: noop,
- }
-}
-
function noop() {} \ No newline at end of file