From c35e26ea14290d59715e28eb1f1137b637f7bccf Mon Sep 17 00:00:00 2001 From: Matthias Kretschmann Date: Sat, 13 Mar 2021 04:56:07 +0100 Subject: [PATCH] test fix --- src/hooks/useDarkMode.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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)')