begin converting WakatimeCore

This commit is contained in:
Vu Nguyen
2021-01-16 20:04:53 -06:00
parent d194bcfe60
commit 0c39fbbc79
25 changed files with 1205 additions and 55 deletions

19
setupTests.ts Normal file
View 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();