1
0
mirror of https://github.com/kremalicious/metamask-extension.git synced 2024-12-23 09:52:26 +01:00

Update Sinon methods. sinon.sandbox.create() -> sandbox.createSandbox()

This commit is contained in:
Thomas 2018-04-04 14:26:18 -07:00
parent 68808c8e24
commit 7aa54916d8
7 changed files with 8 additions and 8 deletions

View File

@ -9,7 +9,7 @@ var reducers = require(path.join(__dirname, '..', '..', '..', 'ui', 'app', 'redu
describe('tx confirmation screen', function () {
beforeEach(function () {
this.sinon = sinon.sandbox.create()
this.sinon = sinon.createSandbox()
})
afterEach(function () {

View File

@ -8,7 +8,7 @@ describe('infura-controller', function () {
before(async function () {
infuraController = new InfuraController()
sandbox = sinon.sandbox.create()
sandbox = sinon.createSandbox()
sinon.stub(infuraController, 'checkInfuraNetworkStatus').resolves(response)
networkStatus = await infuraController.checkInfuraNetworkStatus()
})

View File

@ -8,7 +8,7 @@ const firstTimeState = require('../../app/scripts/first-time-state')
describe('MetaMaskController', function () {
let metamaskController
const sandbox = sinon.sandbox.create()
const sandbox = sinon.createSandbox()
const noop = () => {}
beforeEach(function () {
@ -36,7 +36,7 @@ describe('MetaMaskController', function () {
encryptor: {
encrypt: function (password, object) {
this.object = object
return Promise.resolve()
return Promise.resolve()g
},
decrypt: function () {
return Promise.resolve(this.object)

View File

@ -6,7 +6,7 @@ var contractNamer = require(path.join(__dirname, '..', '..', 'old-ui', 'lib', 'c
describe('contractNamer', function () {
beforeEach(function () {
this.sinon = sinon.sandbox.create()
this.sinon = sinon.createSandbox()
})
afterEach(function () {

View File

@ -294,7 +294,7 @@ describe('PendingTransactionTracker', function () {
})
afterEach(() => {
pendingTxTracker.publishTransaction.reset()
pendingTxTracker.publishTransaction.restore()
})
it('should publish the transaction', function (done) {

View File

@ -10,7 +10,7 @@ var reducers = require(path.join(__dirname, '..', '..', '..', 'ui', 'app', 'redu
describe('#unlockMetamask(selectedAccount)', function () {
beforeEach(function () {
// sinon allows stubbing methods that are easily verified
this.sinon = sinon.sandbox.create()
this.sinon = sinon.createSandbox()
})
afterEach(function () {

View File

@ -10,7 +10,7 @@ describe('util', function () {
for (var i = 0; i < 18; i++) { ethInWei += '0' }
beforeEach(function () {
this.sinon = sinon.sandbox.create()
this.sinon = sinon.createSandbox()
})
afterEach(function () {