Skip to content

Commit 81025b3

Browse files
committed
Mock out commentInput to avoid timeouts in project.test.js
Signed-off-by: Taylor Smock <[email protected]>
1 parent ded7e25 commit 81025b3

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

frontend/src/views/tests/project.test.js

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,13 @@ import { setupFaultyHandlers } from '../../network/tests/server';
2424
import { projects } from '../../network/tests/mockData/projects';
2525
import { MemoryRouter, Route, Routes } from 'react-router-dom';
2626

27+
// The editor is pretty heavy; avoid loading it whenever possible (AKA: Avoid timeouts).
28+
jest.mock('../../components/comments/commentInput', () => {
29+
return {
30+
CommentInputField: () => <></>
31+
}
32+
});
33+
2734
test('CreateProject renders ProjectCreate', async () => {
2835
renderWithRouter(
2936
<QueryParamProvider adapter={ReactRouter6Adapter}>

0 commit comments

Comments
 (0)