fix: init fake runtime.lastError to null.
This commit is contained in:
parent
88e3728c46
commit
b0a111cdc7
|
@ -10,7 +10,7 @@ describe("browser-polyfill", () => {
|
||||||
it("returns a promise which resolves to the callback parameters", () => {
|
it("returns a promise which resolves to the callback parameters", () => {
|
||||||
const fakeChrome = {
|
const fakeChrome = {
|
||||||
alarms: {clear: sinon.stub()},
|
alarms: {clear: sinon.stub()},
|
||||||
runtime: {lastError: undefined},
|
runtime: {lastError: null},
|
||||||
};
|
};
|
||||||
return setupTestDOMWindow(fakeChrome).then(window => {
|
return setupTestDOMWindow(fakeChrome).then(window => {
|
||||||
fakeChrome.alarms.clear
|
fakeChrome.alarms.clear
|
||||||
|
|
|
@ -12,7 +12,7 @@ describe("browser-polyfill", () => {
|
||||||
|
|
||||||
const fakeChrome = {
|
const fakeChrome = {
|
||||||
runtime: {
|
runtime: {
|
||||||
lastError: undefined,
|
lastError: null,
|
||||||
onMessage: {
|
onMessage: {
|
||||||
addListener: sinon.spy(),
|
addListener: sinon.spy(),
|
||||||
hasListener: sinon.stub(),
|
hasListener: sinon.stub(),
|
||||||
|
@ -55,7 +55,7 @@ describe("browser-polyfill", () => {
|
||||||
it("sends the returned value as a message response", () => {
|
it("sends the returned value as a message response", () => {
|
||||||
const fakeChrome = {
|
const fakeChrome = {
|
||||||
runtime: {
|
runtime: {
|
||||||
lastError: undefined,
|
lastError: null,
|
||||||
onMessage: {
|
onMessage: {
|
||||||
addListener: sinon.spy(),
|
addListener: sinon.spy(),
|
||||||
},
|
},
|
||||||
|
|
Loading…
Reference in New Issue