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", () => {
|
||||
const fakeChrome = {
|
||||
alarms: {clear: sinon.stub()},
|
||||
runtime: {lastError: undefined},
|
||||
runtime: {lastError: null},
|
||||
};
|
||||
return setupTestDOMWindow(fakeChrome).then(window => {
|
||||
fakeChrome.alarms.clear
|
||||
|
|
|
@ -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(),
|
||||
},
|
||||
|
|
Loading…
Reference in New Issue