From b0a111cdc77102cd93c7a45861fc658c22ded4d6 Mon Sep 17 00:00:00 2001 From: Luca Greco Date: Tue, 11 Oct 2016 13:56:00 +0200 Subject: [PATCH] fix: init fake runtime.lastError to null. --- test/test-async-functions.js | 2 +- test/test-runtime-onMessage.js | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/test/test-async-functions.js b/test/test-async-functions.js index cf47816..2076e41 100644 --- a/test/test-async-functions.js +++ b/test/test-async-functions.js @@ -10,7 +10,7 @@ describe("browser-polyfill", () => { it("returns a promise which resolves to the callback parameters", () => { const fakeChrome = { alarms: {clear: sinon.stub()}, - runtime: {lastError: undefined}, + runtime: {lastError: null}, }; return setupTestDOMWindow(fakeChrome).then(window => { fakeChrome.alarms.clear diff --git a/test/test-runtime-onMessage.js b/test/test-runtime-onMessage.js index 08f9a03..ca919f2 100644 --- a/test/test-runtime-onMessage.js +++ b/test/test-runtime-onMessage.js @@ -12,7 +12,7 @@ describe("browser-polyfill", () => { const fakeChrome = { runtime: { - lastError: undefined, + lastError: null, onMessage: { addListener: sinon.spy(), hasListener: sinon.stub(), @@ -55,7 +55,7 @@ describe("browser-polyfill", () => { it("sends the returned value as a message response", () => { const fakeChrome = { runtime: { - lastError: undefined, + lastError: null, onMessage: { addListener: sinon.spy(), },