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:
parent
8c9ded41c1
commit
954e1c648d
@ -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", () => {
|
||||
|
Loading…
Reference in New Issue
Block a user