Skip to content

Commit

Permalink
Mock out commentInput to avoid timeouts in project.test.js
Browse files Browse the repository at this point in the history
Signed-off-by: Taylor Smock <[email protected]>
  • Loading branch information
tsmock committed Feb 7, 2024
1 parent b48f0d3 commit fabd78a
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions frontend/src/views/tests/project.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,13 @@ import { setupFaultyHandlers } from '../../network/tests/server';
import { projects } from '../../network/tests/mockData/projects';
import { MemoryRouter, Route, Routes } from 'react-router-dom';

// The editor is pretty heavy; avoid loading it whenever possible (AKA: Avoid timeouts).
jest.mock('../../components/comments/commentInput', () => {
return {
CommentInputField: () => <></>
}
});

test('CreateProject renders ProjectCreate', async () => {
renderWithRouter(
<QueryParamProvider adapter={ReactRouter6Adapter}>
Expand Down

0 comments on commit fabd78a

Please sign in to comment.