mirror of
https://github.com/bitwarden/browser
synced 2025-12-18 01:03:35 +00:00
[PM-5742] Rework Usage of Extension APIs that Cannot be Called with the Background Service Worker (#7667)
* [PM-5742] Rework Usage of Extension APIs that Cannot be Called with the Background Service Worker * [PM-5742] Implementing jest tests for the updated BrowserApi methods * [PM-5742] Implementing jest tests to validate logic within added API calls * [PM-5742] Implementing jest tests to validate logic within added API calls * [PM-5742] Fixing broken Jest tests * [PM-5742] Fixing linter error
This commit is contained in:
@@ -105,6 +105,11 @@ const privacy = {
|
||||
},
|
||||
};
|
||||
|
||||
const extension = {
|
||||
getBackgroundPage: jest.fn(),
|
||||
getViews: jest.fn(),
|
||||
};
|
||||
|
||||
// set chrome
|
||||
global.chrome = {
|
||||
i18n,
|
||||
@@ -116,4 +121,5 @@ global.chrome = {
|
||||
windows,
|
||||
port,
|
||||
privacy,
|
||||
extension,
|
||||
} as any;
|
||||
|
||||
Reference in New Issue
Block a user