Skip to content

Commit f692209

Browse files
authored
Refactor Tasks.test.tsx by cleaning up comments and empty rows
Removed unnecessary comments and adjusted mock for TaskSkeleton component in tests.
1 parent ceac7ce commit f692209

1 file changed

Lines changed: 1 addition & 4 deletions

File tree

frontend/src/components/HomeComponents/Tasks/__tests__/Tasks.test.tsx

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -173,7 +173,6 @@ jest.mock('../Pagination', () => {
173173
));
174174
});
175175

176-
// Mock TaskSkeleton component
177176
jest.mock('../TaskSkeleton', () => {
178177
return {
179178
__esModule: true,
@@ -213,7 +212,7 @@ describe('Tasks Component', () => {
213212
expect(screen.getByTestId('tasks')).toBeInTheDocument();
214213
expect(screen.getByText('Mocked BottomBar')).toBeInTheDocument();
215214
});
216-
215+
217216
test('renders the "Tasks per Page" dropdown with default value', async () => {
218217
await act(async () => {
219218
render(<Tasks {...mockProps} />);
@@ -228,8 +227,6 @@ describe('Tasks Component', () => {
228227

229228
test('does not render tasks when loading is true', () => {
230229
render(<Tasks {...mockProps} isLoading={true} />);
231-
232-
// No task rows should be rendered while loading
233230
expect(screen.queryByRole('row')).not.toBeInTheDocument();
234231
});
235232
});

0 commit comments

Comments
 (0)