mirror of
https://github.com/kremalicious/metamask-extension.git
synced 2024-12-23 09:52:26 +01:00
Remove unused sinon sandboxes (#8063)
These sandboxes were created, then not utilized at all.
This commit is contained in:
parent
c6db54cc6d
commit
a71f56e5da
@ -3,21 +3,16 @@ import sinon from 'sinon'
|
|||||||
import InfuraController from '../../../../app/scripts/controllers/infura'
|
import InfuraController from '../../../../app/scripts/controllers/infura'
|
||||||
|
|
||||||
describe('infura-controller', function () {
|
describe('infura-controller', function () {
|
||||||
let infuraController, sandbox, networkStatus
|
let infuraController, networkStatus
|
||||||
const response = { 'mainnet': 'degraded', 'ropsten': 'ok', 'kovan': 'ok', 'rinkeby': 'down', 'goerli': 'ok' }
|
const response = { 'mainnet': 'degraded', 'ropsten': 'ok', 'kovan': 'ok', 'rinkeby': 'down', 'goerli': 'ok' }
|
||||||
|
|
||||||
describe('Network status queries', function () {
|
describe('Network status queries', function () {
|
||||||
before(async function () {
|
before(async function () {
|
||||||
infuraController = new InfuraController()
|
infuraController = new InfuraController()
|
||||||
sandbox = sinon.createSandbox()
|
|
||||||
sinon.stub(infuraController, 'checkInfuraNetworkStatus').resolves(response)
|
sinon.stub(infuraController, 'checkInfuraNetworkStatus').resolves(response)
|
||||||
networkStatus = await infuraController.checkInfuraNetworkStatus()
|
networkStatus = await infuraController.checkInfuraNetworkStatus()
|
||||||
})
|
})
|
||||||
|
|
||||||
after(function () {
|
|
||||||
sandbox.restore()
|
|
||||||
})
|
|
||||||
|
|
||||||
describe('Mainnet', function () {
|
describe('Mainnet', function () {
|
||||||
it('should have Mainnet', function () {
|
it('should have Mainnet', function () {
|
||||||
assert.equal(Object.keys(networkStatus)[0], 'mainnet')
|
assert.equal(Object.keys(networkStatus)[0], 'mainnet')
|
||||||
|
@ -1,19 +1,8 @@
|
|||||||
import assert from 'assert'
|
import assert from 'assert'
|
||||||
import sinon from 'sinon'
|
|
||||||
import * as actions from '../../../ui/app/store/actions'
|
import * as actions from '../../../ui/app/store/actions'
|
||||||
import reducers from '../../../ui/app/ducks'
|
import reducers from '../../../ui/app/ducks'
|
||||||
|
|
||||||
describe('#unlockMetamask(selectedAccount)', function () {
|
describe('#unlockMetamask(selectedAccount)', function () {
|
||||||
beforeEach(function () {
|
|
||||||
// sinon allows stubbing methods that are easily verified
|
|
||||||
this.sinon = sinon.createSandbox()
|
|
||||||
})
|
|
||||||
|
|
||||||
afterEach(function () {
|
|
||||||
// sinon requires cleanup otherwise it will overwrite context
|
|
||||||
this.sinon.restore()
|
|
||||||
})
|
|
||||||
|
|
||||||
describe('after an error', function () {
|
describe('after an error', function () {
|
||||||
it('clears warning', function () {
|
it('clears warning', function () {
|
||||||
const warning = 'this is the wrong warning'
|
const warning = 'this is the wrong warning'
|
||||||
|
@ -1,5 +1,4 @@
|
|||||||
import assert from 'assert'
|
import assert from 'assert'
|
||||||
import sinon from 'sinon'
|
|
||||||
import ethUtil from 'ethereumjs-util'
|
import ethUtil from 'ethereumjs-util'
|
||||||
import * as util from './util'
|
import * as util from './util'
|
||||||
|
|
||||||
@ -9,14 +8,6 @@ describe('util', function () {
|
|||||||
ethInWei += '0'
|
ethInWei += '0'
|
||||||
}
|
}
|
||||||
|
|
||||||
beforeEach(function () {
|
|
||||||
this.sinon = sinon.createSandbox()
|
|
||||||
})
|
|
||||||
|
|
||||||
afterEach(function () {
|
|
||||||
this.sinon.restore()
|
|
||||||
})
|
|
||||||
|
|
||||||
describe('#parseBalance', function () {
|
describe('#parseBalance', function () {
|
||||||
it('should render 0.01 eth correctly', function () {
|
it('should render 0.01 eth correctly', function () {
|
||||||
const input = '0x2386F26FC10000'
|
const input = '0x2386F26FC10000'
|
||||||
|
Loading…
Reference in New Issue
Block a user