diff options
author | Thomas <tmashuang@gmail.com> | 2018-04-05 05:26:18 +0800 |
---|---|---|
committer | Thomas <tmashuang@gmail.com> | 2018-04-05 05:26:18 +0800 |
commit | 7aa54916d8508aababd202eef2e57bc90c6c842d (patch) | |
tree | 24e4f38d95d95cf1f4b1287ecd6dd4c9b3ab0e36 | |
parent | 68808c8e242bd6240ef8f4d73f91514fc73b32f0 (diff) | |
download | tangerine-wallet-browser-7aa54916d8508aababd202eef2e57bc90c6c842d.tar.gz tangerine-wallet-browser-7aa54916d8508aababd202eef2e57bc90c6c842d.tar.zst tangerine-wallet-browser-7aa54916d8508aababd202eef2e57bc90c6c842d.zip |
Update Sinon methods. sinon.sandbox.create() -> sandbox.createSandbox()
-rw-r--r-- | test/unit/actions/tx_test.js | 2 | ||||
-rw-r--r-- | test/unit/infura-controller-test.js | 2 | ||||
-rw-r--r-- | test/unit/metamask-controller-test.js | 4 | ||||
-rw-r--r-- | test/unit/nameForAccount_test.js | 2 | ||||
-rw-r--r-- | test/unit/pending-tx-test.js | 2 | ||||
-rw-r--r-- | test/unit/reducers/unlock_vault_test.js | 2 | ||||
-rw-r--r-- | test/unit/util_test.js | 2 |
7 files changed, 8 insertions, 8 deletions
diff --git a/test/unit/actions/tx_test.js b/test/unit/actions/tx_test.js index b6a691860..c110f71fc 100644 --- a/test/unit/actions/tx_test.js +++ b/test/unit/actions/tx_test.js @@ -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 () { diff --git a/test/unit/infura-controller-test.js b/test/unit/infura-controller-test.js index 605305efa..c9f0e7587 100644 --- a/test/unit/infura-controller-test.js +++ b/test/unit/infura-controller-test.js @@ -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() }) diff --git a/test/unit/metamask-controller-test.js b/test/unit/metamask-controller-test.js index 3e696a9c3..b65e9184d 100644 --- a/test/unit/metamask-controller-test.js +++ b/test/unit/metamask-controller-test.js @@ -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) diff --git a/test/unit/nameForAccount_test.js b/test/unit/nameForAccount_test.js index 32af49e9d..9bb02c6bc 100644 --- a/test/unit/nameForAccount_test.js +++ b/test/unit/nameForAccount_test.js @@ -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 () { diff --git a/test/unit/pending-tx-test.js b/test/unit/pending-tx-test.js index f0b4e3bfc..62f4f28a8 100644 --- a/test/unit/pending-tx-test.js +++ b/test/unit/pending-tx-test.js @@ -294,7 +294,7 @@ describe('PendingTransactionTracker', function () { }) afterEach(() => { - pendingTxTracker.publishTransaction.reset() + pendingTxTracker.publishTransaction.restore() }) it('should publish the transaction', function (done) { diff --git a/test/unit/reducers/unlock_vault_test.js b/test/unit/reducers/unlock_vault_test.js index 2b7d70b2c..d66e8edbb 100644 --- a/test/unit/reducers/unlock_vault_test.js +++ b/test/unit/reducers/unlock_vault_test.js @@ -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 () { diff --git a/test/unit/util_test.js b/test/unit/util_test.js index 59048975a..39473854f 100644 --- a/test/unit/util_test.js +++ b/test/unit/util_test.js @@ -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 () { |