Skip to content

Commit c5d2fd9

Browse files
fix(tests): make ModuleArchiveContainer test more reliable (#4013)
1 parent ac71dec commit c5d2fd9

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

website/src/views/modules/ModuleArchiveContainer.test.tsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,9 @@ describe(ModuleArchiveContainerComponent, () => {
8282
test('should show 404 page when the course code does not exist', async () => {
8383
mockAxiosRequest.mockRejectedValue(notFoundError);
8484
make('/archive/CS1234/2017-2018');
85-
expect(await screen.findByText(/course CS1234 not found/)).toBeInTheDocument();
85+
expect(
86+
await screen.findByText(/course CS1234 not found/, { exact: false }),
87+
).toBeInTheDocument();
8688
});
8789

8890
test('should redirect to canonical URL', async () => {

0 commit comments

Comments
 (0)