mirror of
https://github.com/ant-design/ant-design.git
synced 2025-01-18 14:13:37 +08:00
test: raise test covarage (#38027)
* test: raise test covarage * chore: code clean * chore: lock jest-dom to v28 * chore: lock jest-dom * test: update setup
This commit is contained in:
parent
0d7c87421a
commit
630c24aa79
@ -283,6 +283,8 @@ describe('Modal.confirm triggers callbacks correctly', () => {
|
||||
jest.useFakeTimers();
|
||||
const onCancel = jest.fn();
|
||||
Modal.confirm({
|
||||
// test legacy visible
|
||||
visible: true,
|
||||
title: 'title',
|
||||
content: 'content',
|
||||
onCancel,
|
||||
|
@ -187,7 +187,7 @@
|
||||
"@types/warning": "^3.0.0",
|
||||
"@typescript-eslint/eslint-plugin": "^5.0.0",
|
||||
"@typescript-eslint/parser": "^5.0.0",
|
||||
"antd-img-crop": "^4.0.0",
|
||||
"antd-img-crop": "4.2.5",
|
||||
"array-move": "^4.0.0",
|
||||
"babel-plugin-add-react-displayname": "^0.0.5",
|
||||
"bisheng": "^3.7.0-alpha.4",
|
||||
|
@ -15,6 +15,8 @@ if (typeof window !== 'undefined') {
|
||||
// ref: https://github.com/ant-design/ant-design/issues/18774
|
||||
if (!window.matchMedia) {
|
||||
Object.defineProperty(global.window, 'matchMedia', {
|
||||
writable: true,
|
||||
configurable: true,
|
||||
value: jest.fn(query => ({
|
||||
matches: query.includes('max-width'),
|
||||
addListener: jest.fn(),
|
||||
|
Loading…
Reference in New Issue
Block a user