1
0
mirror of https://github.com/bitwarden/browser.git synced 2024-11-14 10:26:19 +01:00

update ipc mocks

This commit is contained in:
Alec Rippberger 2024-11-13 07:28:37 -06:00
parent 8c9ded41c1
commit 954e1c648d
No known key found for this signature in database
GPG Key ID: 9DD8DA583B28154A

View File

@ -10,9 +10,11 @@ import { DesktopLoginApprovalService } from "./desktop-login-approval.service";
describe("DesktopLoginApprovalService", () => {
let service: DesktopLoginApprovalService;
let i18nService: MockProxy<I18nServiceAbstraction>;
let originalIpc: any;
beforeEach(() => {
(global as any).desktopApi = {
originalIpc = (global as any).ipc;
(global as any).ipc = {
auth: {
loginRequest: jest.fn(),
},
@ -38,7 +40,7 @@ describe("DesktopLoginApprovalService", () => {
afterEach(() => {
jest.clearAllMocks();
delete (global as any).desktopApi;
(global as any).ipc = originalIpc;
});
it("is created successfully", () => {