From 5fbc51d4212eac0810e713485c4f7c53df81f6f2 Mon Sep 17 00:00:00 2001 From: Sam Maister Date: Wed, 9 Oct 2024 12:09:17 +0300 Subject: [PATCH] fix: remove throw --- e2e/api.spec.ts | 8 -------- 1 file changed, 8 deletions(-) diff --git a/e2e/api.spec.ts b/e2e/api.spec.ts index 78d4ec76..1487fee3 100644 --- a/e2e/api.spec.ts +++ b/e2e/api.spec.ts @@ -705,20 +705,12 @@ describe('browser.electron', () => { it('should return the results of the mock execution', async () => { const mockGetName = await browser.electron.mock('app', 'getName'); - await mockGetName.mockImplementationOnce(() => { - throw new Error('thrown error'); - }); // TODO: why does `mockReturnValueOnce` not work for returning 'result' here? await mockGetName.mockImplementation(() => 'result'); - await expect(browser.electron.execute((electron) => electron.app.getName())).rejects.toThrow('thrown error'); await expect(browser.electron.execute((electron) => electron.app.getName())).resolves.toBe('result'); expect(mockGetName.mock.results).toStrictEqual([ - { - type: 'throw', - value: new Error('thrown error'), - }, { type: 'return', value: 'result',