fix: init fake runtime.lastError to null.

This commit is contained in:
Luca Greco 2016-10-11 13:56:00 +02:00
parent 88e3728c46
commit b0a111cdc7
2 changed files with 3 additions and 3 deletions

View File

@ -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

View File

@ -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(),
},