mirror of
https://github.com/bitwarden/browser
synced 2025-12-11 05:43:41 +00:00
fix failing test
This commit is contained in:
@@ -280,10 +280,10 @@ describe("VaultPopupAutofillService", () => {
|
||||
|
||||
it("should close popup after a timeout for chromium browsers", async () => {
|
||||
mockPlatformUtilsService.isFirefox.mockReturnValue(false);
|
||||
jest.spyOn(global, "setTimeout");
|
||||
jest.spyOn(global, "requestAnimationFrame");
|
||||
await service.doAutofill(mockCipher);
|
||||
jest.advanceTimersByTime(50);
|
||||
expect(setTimeout).toHaveBeenCalledTimes(1);
|
||||
expect(requestAnimationFrame).toHaveBeenCalled();
|
||||
expect(BrowserApi.closePopup).toHaveBeenCalled();
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user