Skip to content

Commit 2a41621

Browse files
committed
Merge master to include ESC test fix
2 parents 0b91e66 + 718a756 commit 2a41621

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

tests/preview.test.tsx

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import ZoomInOutlined from '@ant-design/icons/ZoomInOutlined';
77
import ZoomOutOutlined from '@ant-design/icons/ZoomOutOutlined';
88
import { spyElementPrototypes } from '@rc-component/util/lib/test/domHook';
99
import { act, createEvent, fireEvent, render } from '@testing-library/react';
10-
import React, { useState } from 'react';
10+
import React from 'react';
1111
import Dialog from '@rc-component/dialog';
1212

1313
jest.mock('../src/Preview', () => {
@@ -23,6 +23,11 @@ jest.mock('../src/Preview', () => {
2323
return MockPreview;
2424
});
2525

26+
jest.mock('@rc-component/util/lib/hooks/useId', () => {
27+
const origin = jest.requireActual('react');
28+
return origin.useId;
29+
});
30+
2631
import Image from '../src';
2732

2833
describe('Preview', () => {

0 commit comments

Comments
 (0)