setup mock browser object
This commit is contained in:
19
__mocks__/webextension-polyfill-ts/index.ts
Normal file
19
__mocks__/webextension-polyfill-ts/index.ts
Normal file
@@ -0,0 +1,19 @@
|
||||
class BrowserMock {
|
||||
runtime = {
|
||||
getBackgroundPage() {
|
||||
return 'https://background-page.html';
|
||||
},
|
||||
getManifest() {
|
||||
return {
|
||||
version: 'test-version',
|
||||
};
|
||||
},
|
||||
openOptionsPage() {
|
||||
return 'https://options-page.html';
|
||||
},
|
||||
};
|
||||
}
|
||||
|
||||
export const browser = new BrowserMock();
|
||||
|
||||
export default { browser };
|
||||
Reference in New Issue
Block a user