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:
parent
68808c8e24
commit
7aa54916d8
@ -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 () {
|
||||
|
@ -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()
|
||||
})
|
||||
|
@ -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)
|
||||
|
@ -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 () {
|
||||
|
@ -294,7 +294,7 @@ describe('PendingTransactionTracker', function () {
|
||||
})
|
||||
|
||||
afterEach(() => {
|
||||
pendingTxTracker.publishTransaction.reset()
|
||||
pendingTxTracker.publishTransaction.restore()
|
||||
})
|
||||
|
||||
it('should publish the transaction', function (done) {
|
||||
|
@ -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 () {
|
||||
|
@ -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 () {
|
||||
|
Loading…
Reference in New Issue
Block a user