forked from opossum-tool/OpossumUI
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsetupTests.ts
31 lines (25 loc) · 941 Bytes
/
setupTests.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
// SPDX-FileCopyrightText: Meta Platforms, Inc. and its affiliates
// SPDX-FileCopyrightText: TNG Technology Consulting GmbH <https://www.tngtech.com>
// SPDX-FileCopyrightText: Nico Carl <nicocarl@protonmail.com>
//
// SPDX-License-Identifier: Apache-2.0
import '@testing-library/jest-dom/extend-expect';
const TEST_TIMEOUT = 15000;
jest.setTimeout(TEST_TIMEOUT);
jest.mock('./src/Frontend/web-workers/get-new-accordion-workers');
jest.mock('./src/Frontend/web-workers/get-new-folder-progress-bar-worker');
beforeAll(() => {
global.window.electronAPI = {
openLink: jest.fn().mockReturnValue(Promise.resolve()),
openFile: jest.fn(),
deleteFile: jest.fn(),
keepFile: jest.fn(),
sendErrorInformation: jest.fn(),
exportFile: jest.fn(),
saveFile: jest.fn(),
on: jest.fn(),
removeListener: jest.fn(),
};
jest.spyOn(console, 'info').mockImplementation();
});
beforeEach(() => jest.clearAllMocks());