1
0
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:
Mark Stacey 2020-02-17 21:31:09 -04:00 committed by GitHub
parent c6db54cc6d
commit a71f56e5da
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 1 additions and 26 deletions

View File

@ -3,21 +3,16 @@ import sinon from 'sinon'
import InfuraController from '../../../../app/scripts/controllers/infura'
describe('infura-controller', function () {
let infuraController, sandbox, networkStatus
let infuraController, networkStatus
const response = { 'mainnet': 'degraded', 'ropsten': 'ok', 'kovan': 'ok', 'rinkeby': 'down', 'goerli': 'ok' }
describe('Network status queries', function () {
before(async function () {
infuraController = new InfuraController()
sandbox = sinon.createSandbox()
sinon.stub(infuraController, 'checkInfuraNetworkStatus').resolves(response)
networkStatus = await infuraController.checkInfuraNetworkStatus()
})
after(function () {
sandbox.restore()
})
describe('Mainnet', function () {
it('should have Mainnet', function () {
assert.equal(Object.keys(networkStatus)[0], 'mainnet')

View File

@ -1,19 +1,8 @@
import assert from 'assert'
import sinon from 'sinon'
import * as actions from '../../../ui/app/store/actions'
import reducers from '../../../ui/app/ducks'
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 () {
it('clears warning', function () {
const warning = 'this is the wrong warning'

View File

@ -1,5 +1,4 @@
import assert from 'assert'
import sinon from 'sinon'
import ethUtil from 'ethereumjs-util'
import * as util from './util'
@ -9,14 +8,6 @@ describe('util', function () {
ethInWei += '0'
}
beforeEach(function () {
this.sinon = sinon.createSandbox()
})
afterEach(function () {
this.sinon.restore()
})
describe('#parseBalance', function () {
it('should render 0.01 eth correctly', function () {
const input = '0x2386F26FC10000'