mirror of
https://github.com/kremalicious/metamask-extension.git
synced 2024-12-23 09:52:26 +01:00
Add failing test for #2577 Seed Phrase Bug
This commit is contained in:
parent
408bbe726f
commit
884f203564
@ -27,6 +27,24 @@ describe('MetaMaskController', function () {
|
|||||||
|
|
||||||
describe('Metamask Controller', function () {
|
describe('Metamask Controller', function () {
|
||||||
assert(metamaskController)
|
assert(metamaskController)
|
||||||
|
|
||||||
|
describe('#createNewVaultAndKeychain', function () {
|
||||||
|
it('can only create new vault on keyringController once', async function () {
|
||||||
|
|
||||||
|
const selectStub = sinon.stub(metamaskController, 'selectFirstIdentity')
|
||||||
|
|
||||||
|
const expectation = sinon.mock(metamaskController.keyringController)
|
||||||
|
.expects('createNewVaultAndKeychain').once()
|
||||||
|
|
||||||
|
const password = 'a-fake-password'
|
||||||
|
|
||||||
|
const first = await metamaskController.createNewVaultAndKeychain(password)
|
||||||
|
const second = await metamaskController.createNewVaultAndKeychain(password)
|
||||||
|
|
||||||
|
expectation.verify()
|
||||||
|
selectStub.reset()
|
||||||
|
})
|
||||||
|
})
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user