From 81025b3360bed173bfbe464cadf69fffabfd3d36 Mon Sep 17 00:00:00 2001 From: Taylor Smock Date: Wed, 7 Feb 2024 10:43:53 -0700 Subject: [PATCH] Mock out commentInput to avoid timeouts in project.test.js Signed-off-by: Taylor Smock --- frontend/src/views/tests/project.test.js | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/frontend/src/views/tests/project.test.js b/frontend/src/views/tests/project.test.js index 7b02149495..411caf5e22 100644 --- a/frontend/src/views/tests/project.test.js +++ b/frontend/src/views/tests/project.test.js @@ -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(