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();