|
|
|
@ -11,6 +11,10 @@ import createTxMeta from '../../../lib/createTxMeta'; |
|
|
|
|
import { addHexPrefix } from '../../../../app/scripts/lib/util'; |
|
|
|
|
import { TRANSACTION_STATUSES } from '../../../../shared/constants/transaction'; |
|
|
|
|
|
|
|
|
|
const Ganache = require('../../../e2e/ganache'); |
|
|
|
|
|
|
|
|
|
const ganacheServer = new Ganache(); |
|
|
|
|
|
|
|
|
|
const threeBoxSpies = { |
|
|
|
|
init: sinon.stub(), |
|
|
|
|
getThreeBoxSyncingState: sinon.stub().returns(true), |
|
|
|
@ -90,6 +94,10 @@ describe('MetaMaskController', function () { |
|
|
|
|
const sandbox = sinon.createSandbox(); |
|
|
|
|
const noop = () => undefined; |
|
|
|
|
|
|
|
|
|
before(async function () { |
|
|
|
|
await ganacheServer.start(); |
|
|
|
|
}); |
|
|
|
|
|
|
|
|
|
beforeEach(function () { |
|
|
|
|
nock('https://min-api.cryptocompare.com') |
|
|
|
|
.persist() |
|
|
|
@ -133,6 +141,10 @@ describe('MetaMaskController', function () { |
|
|
|
|
sandbox.restore(); |
|
|
|
|
}); |
|
|
|
|
|
|
|
|
|
after(async function () { |
|
|
|
|
await ganacheServer.quit(); |
|
|
|
|
}); |
|
|
|
|
|
|
|
|
|
describe('#getAccounts', function () { |
|
|
|
|
it('returns first address when dapp calls web3.eth.getAccounts', async function () { |
|
|
|
|
const password = 'a-fake-password'; |
|
|
|
|