diff --git a/src/hooks/useDarkMode.ts b/src/hooks/useDarkMode.ts index bf72f7ab..53e3f6a2 100644 --- a/src/hooks/useDarkMode.ts +++ b/src/hooks/useDarkMode.ts @@ -42,7 +42,7 @@ export default function useDarkMode(): { }, []) useEffect(() => { - if (!isClient) return + if (!isClient || process.env.NODE_ENV === 'test') return const darkModeQuery = window.matchMedia('(prefers-color-scheme: dark)')