diff --git a/packages/color-mode/test/color-mode-provider__server.test.tsx b/packages/color-mode/test/color-mode-provider__server.test.tsx index a59189264b5..1208bea3c32 100644 --- a/packages/color-mode/test/color-mode-provider__server.test.tsx +++ b/packages/color-mode/test/color-mode-provider__server.test.tsx @@ -9,9 +9,17 @@ import { } from "./utils" import * as colorModeUtils from "../src/color-mode.utils" +jest.mock("@chakra-ui/utils", () => { + const actual = jest.requireActual("@chakra-ui/utils") + + return { + ...actual, + isBrowser: false, + } +}) + beforeEach(() => { jest.resetAllMocks() - mockIsBrowser(false) }) describe(" localStorage server", () => {