diff --git a/test/unit/app/controllers/network/network-controller-test.js b/test/unit/app/controllers/network/network-controller-test.js index 14d3bf31f..08164d99d 100644 --- a/test/unit/app/controllers/network/network-controller-test.js +++ b/test/unit/app/controllers/network/network-controller-test.js @@ -18,7 +18,6 @@ describe('NetworkController', function () { .reply(200) networkController = new NetworkController() - networkController.initializeProvider(networkControllerProviderConfig) }) afterEach(function () { @@ -34,8 +33,9 @@ describe('NetworkController', function () { assert.equal(providerProxy.test, true) }) }) + describe('#getNetworkState', function () { - it('should return loading when new', function () { + it('should return "loading" when new', function () { const networkState = networkController.getNetworkState() assert.equal(networkState, 'loading', 'network is loading') }) @@ -51,11 +51,13 @@ describe('NetworkController', function () { describe('#setProviderType', function () { it('should update provider.type', function () { + networkController.initializeProvider(networkControllerProviderConfig) networkController.setProviderType('mainnet') const type = networkController.getProviderConfig().type assert.equal(type, 'mainnet', 'provider type is updated') }) it('should set the network to loading', function () { + networkController.initializeProvider(networkControllerProviderConfig) networkController.setProviderType('mainnet') const loading = networkController.isNetworkLoading() assert.ok(loading, 'network is loading')