From be1fb7b2829b1ba85a686748611756a7054d4f07 Mon Sep 17 00:00:00 2001
From: Shekhar Patel <90516956+duplixx@users.noreply.github.com>
Date: Sat, 11 Nov 2023 07:37:18 +0000
Subject: [PATCH] linting fix
---
.../SecuredRouteForUser.test.tsx | 34 +++++++++----------
1 file changed, 17 insertions(+), 17 deletions(-)
diff --git a/src/components/UserPortal/SecuredRouteForUser/SecuredRouteForUser.test.tsx b/src/components/UserPortal/SecuredRouteForUser/SecuredRouteForUser.test.tsx
index 7e4ea889d6..0baae3509c 100644
--- a/src/components/UserPortal/SecuredRouteForUser/SecuredRouteForUser.test.tsx
+++ b/src/components/UserPortal/SecuredRouteForUser/SecuredRouteForUser.test.tsx
@@ -1,15 +1,15 @@
-import React from 'react';
-import { MemoryRouter, Route } from 'react-router-dom';
-import { render, screen, waitFor } from '@testing-library/react';
-import SecuredRouteForUser from './SecuredRouteForUser';
+import React from "react";
+import { MemoryRouter, Route } from "react-router-dom";
+import { render, screen, waitFor } from "@testing-library/react";
+import SecuredRouteForUser from "./SecuredRouteForUser";
-describe('SecuredRouteForUser', () => {
- test('renders the route when the user is logged in', () => {
+describe("SecuredRouteForUser", () => {
+ test("renders the route when the user is logged in", () => {
// Set the 'IsLoggedIn' value to 'TRUE' in localStorage to simulate a logged-in user
- localStorage.setItem('IsLoggedIn', 'TRUE');
+ localStorage.setItem("IsLoggedIn", "TRUE");
render(
-
+
(
@@ -23,18 +23,18 @@ describe('SecuredRouteForUser', () => {
/>
)}
/>
-
+ ,
);
- expect(screen.getByTestId('organizations-content')).toBeInTheDocument();
+ expect(screen.getByTestId("organizations-content")).toBeInTheDocument();
});
- test('redirects to /user when the user is not logged in', async () => {
+ test("redirects to /user when the user is not logged in", async () => {
// Set the user as not logged in in local storage
- localStorage.setItem('IsLoggedIn', 'FALSE');
+ localStorage.setItem("IsLoggedIn", "FALSE");
render(
-
+
{
)}
/>
-
+ ,
);
- await waitFor(() => {
- expect(window.location.pathname).toBe('/');
- });
+ await waitFor(() => {
+ expect(window.location.pathname).toBe("/");
+ });
});
});