Skip to content

Commit 479238a

Browse files
committed
convert test/ColorPicker
1 parent 3d5369a commit 479238a

File tree

1 file changed

+10
-9
lines changed

1 file changed

+10
-9
lines changed

packages/editor/test/ColorPicker.js renamed to packages/editor/test/ColorPicker.tsx

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -9,15 +9,16 @@ const { act } = renderer
99

1010
afterEach(cleanup)
1111

12-
if (global.document) {
13-
document.createRange = () => ({
14-
setStart: () => {},
15-
setEnd: () => {},
16-
commonAncestorContainer: {
17-
nodeName: 'BODY',
18-
ownerDocument: document,
19-
},
20-
})
12+
if ((global as any).document) {
13+
document.createRange = () =>
14+
(({
15+
setStart: () => {},
16+
setEnd: () => {},
17+
commonAncestorContainer: {
18+
nodeName: 'BODY',
19+
ownerDocument: document,
20+
},
21+
} as unknown) as Range)
2122
}
2223

2324
test('renders with styles', () => {

0 commit comments

Comments
 (0)