From 9fc83a2c194edca948a89841c65a92182884b2c1 Mon Sep 17 00:00:00 2001 From: Liam Stevens <8955671+liamstevens111@users.noreply.github.com> Date: Tue, 21 Mar 2023 11:54:13 +0700 Subject: [PATCH] [#19] Add test for PrivateRoutes but infinite redirect loop if no user --- src/components/PrivateRoute/index.test.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/PrivateRoute/index.test.tsx b/src/components/PrivateRoute/index.test.tsx index 0b6e97a..b289f65 100644 --- a/src/components/PrivateRoute/index.test.tsx +++ b/src/components/PrivateRoute/index.test.tsx @@ -1,7 +1,7 @@ /* eslint-disable camelcase */ import { MemoryRouter } from 'react-router-dom'; -import { render, screen } from '@testing-library/react'; +import { render, screen, waitForElementToBeRemoved } from '@testing-library/react'; import PrivateRoute from '.'; import { setItem, clearItem } from '../../helpers/localStorage';