begin converting WakatimeCore
This commit is contained in:
19
setupTests.ts
Normal file
19
setupTests.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';
|
||||
},
|
||||
};
|
||||
}
|
||||
//TODO: Improve mocking
|
||||
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
||||
// @ts-expect-error
|
||||
window.browser = new BrowserMock();
|
||||
Reference in New Issue
Block a user