We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 4c09d00 + 996265b commit 09a5d9dCopy full SHA for 09a5d9d
1 file changed
webapp/src/setupTests.js
@@ -7,6 +7,15 @@ import '@testing-library/jest-dom';
7
// add jest-canvas-mock to prevent a Not implemented error (see https://github.com/hustcc/jest-canvas-mock/issues/2)
8
import 'jest-canvas-mock';
9
10
+// Mocking authApi (needed to render App)
11
+import { authApi } from './services/contaxy-api';
12
+
13
+jest.mock('./services/contaxy-api');
14
15
+beforeEach(() => {
16
+ authApi.oauthEnabled.mockResolvedValue({});
17
+});
18
19
// add mocks here that are needed for all tests as this file is automatically executed (see https://github.com/facebook/create-react-app/issues/9706)
20
jest.mock('jdenticon', () => ({
21
update: () => 'foo',
0 commit comments