Skip to content

Commit

Permalink
test: fix Cannot access mockCanUseDom before initialization
Browse files Browse the repository at this point in the history
  • Loading branch information
afc163 committed Dec 20, 2022
1 parent 69617f5 commit 20b4f46
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion components/config-provider/__tests__/theme.test.tsx
Expand Up @@ -10,7 +10,8 @@ import { resetWarned } from '../../_util/warning';

const { defaultAlgorithm, darkAlgorithm, compactAlgorithm } = theme;

let mockCanUseDom = true;
// eslint-disable-next-line no-var
var mockCanUseDom = true;

jest.mock('rc-util/lib/Dom/canUseDom', () => () => mockCanUseDom);

Expand Down

0 comments on commit 20b4f46

Please sign in to comment.