From 7548734b25e0c059a75220b8d6e4f7d154b7025a Mon Sep 17 00:00:00 2001 From: IITI-tushar <019saxenatushar@gmail.com> Date: Sun, 26 Jan 2025 18:19:08 +0530 Subject: [PATCH] update superAdmninScreen.spec.tsx --- src/components/SuperAdminScreen/SuperAdminScreen.spec.tsx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/components/SuperAdminScreen/SuperAdminScreen.spec.tsx b/src/components/SuperAdminScreen/SuperAdminScreen.spec.tsx index 8f210d968e..0d15c12061 100644 --- a/src/components/SuperAdminScreen/SuperAdminScreen.spec.tsx +++ b/src/components/SuperAdminScreen/SuperAdminScreen.spec.tsx @@ -8,7 +8,9 @@ import { store } from 'state/store'; import i18nForTest from 'utils/i18nForTest'; import SuperAdminScreen from './SuperAdminScreen'; import { describe, test, expect } from 'vitest'; +import useLocalStorage from 'utils/useLocalstorage'; import '../../style/app.module.css'; +const { setItem } = useLocalStorage(); const resizeWindow = (width: number): void => { window.innerWidth = width; @@ -21,7 +23,7 @@ const clickToggleMenuBtn = (toggleButton: HTMLElement): void => { describe('Testing LeftDrawer in SuperAdminScreen', () => { beforeAll(() => { - localStorage.setItem('name', 'John Doe'); + setItem('name', 'John Doe'); }); afterAll(() => { localStorage.clear();