diff --git a/src/background/chrome-api.ts b/src/background/chrome-api.ts index e24cbeec..02b3b2b3 100644 --- a/src/background/chrome-api.ts +++ b/src/background/chrome-api.ts @@ -73,7 +73,7 @@ export function getChromeAPI(chrome = globalThis.chrome) { }, scripting: { - executeScript: chrome.scripting?.executeScript, + executeScript: chrome.scripting.executeScript, }, storage: { diff --git a/tests/background/chrome-api-test.js b/tests/background/chrome-api-test.js index a2efde1a..2dbb1928 100644 --- a/tests/background/chrome-api-test.js +++ b/tests/background/chrome-api-test.js @@ -47,6 +47,10 @@ describe('chrome-api', () => { update: sinon.stub(), }, + scripting: { + executeScript: sinon.stub(), + }, + storage: { sync: { get: sinon.stub(),