From 94a4b4d7dbfabb5809815dd9658b9ed31ade6890 Mon Sep 17 00:00:00 2001 From: Thomas Date: Wed, 23 Oct 2019 12:09:27 -0700 Subject: [PATCH 1/2] Stub signTypedMessage --- test/unit/ui/app/actions.spec.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/unit/ui/app/actions.spec.js b/test/unit/ui/app/actions.spec.js index 713edd821..ad6218802 100644 --- a/test/unit/ui/app/actions.spec.js +++ b/test/unit/ui/app/actions.spec.js @@ -786,9 +786,9 @@ describe('Actions', () => { it('calls signTypedMsg in background with no error', async () => { const store = mockStore() - signTypedMsgSpy = sinon.spy(background, 'signTypedMessage') + signTypedMsgSpy = sinon.stub(background, 'signTypedMessage') - await store.dispatch(actions.signTypedMsg(msgParamsV3)) + store.dispatch(await actions.signTypedMsg(msgParamsV3)) assert(signTypedMsgSpy.calledOnce) }) From 5f53e4b67e06c9c60bba97ad54de904552baf9d1 Mon Sep 17 00:00:00 2001 From: Thomas Date: Wed, 23 Oct 2019 12:43:22 -0700 Subject: [PATCH 2/2] Remove async --- test/unit/ui/app/actions.spec.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/unit/ui/app/actions.spec.js b/test/unit/ui/app/actions.spec.js index ad6218802..9ed21e729 100644 --- a/test/unit/ui/app/actions.spec.js +++ b/test/unit/ui/app/actions.spec.js @@ -784,11 +784,11 @@ describe('Actions', () => { signTypedMsgSpy.restore() }) - it('calls signTypedMsg in background with no error', async () => { + it('calls signTypedMsg in background with no error', () => { const store = mockStore() signTypedMsgSpy = sinon.stub(background, 'signTypedMessage') - store.dispatch(await actions.signTypedMsg(msgParamsV3)) + store.dispatch(actions.signTypedMsg(msgParamsV3)) assert(signTypedMsgSpy.calledOnce) })