Skip to content

Commit 53cc34d

Browse files
committed
chore: use testing-library dom events
1 parent fe7473a commit 53cc34d

2 files changed

Lines changed: 16 additions & 14 deletions

File tree

package.json

Lines changed: 14 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -44,39 +44,40 @@
4444
"clsx": "^2.1.1"
4545
},
4646
"devDependencies": {
47+
"@babel/eslint-parser": "^7.29.7",
48+
"@babel/eslint-plugin": "^7.29.7",
49+
"@eslint/eslintrc": "^3.3.5",
50+
"@eslint/js": "^9.39.4",
4751
"@rc-component/father-plugin": "^2.2.0",
4852
"@rc-component/np": "^1.0.4",
53+
"@testing-library/dom": "^10.4.1",
54+
"@testing-library/jest-dom": "^6.9.1",
4955
"@testing-library/react": "^16.3.2",
5056
"@types/jest": "^30.0.0",
5157
"@types/node": "^26.0.1",
5258
"@types/react": "^19.2.17",
5359
"@types/react-dom": "^19.2.3",
60+
"@typescript-eslint/eslint-plugin": "^8.62.0",
61+
"@typescript-eslint/parser": "^8.62.0",
5462
"@umijs/fabric": "^4.0.1",
63+
"cross-env": "^10.1.0",
5564
"dumi": "^2.4.35",
5665
"eslint": "^9.39.4",
66+
"eslint-config-prettier": "^10.1.8",
5767
"eslint-plugin-jest": "^29.15.3",
68+
"eslint-plugin-react": "^7.37.5",
69+
"eslint-plugin-react-hooks": "^7.1.1",
5870
"eslint-plugin-unicorn": "^65.0.1",
5971
"father": "^4.6.23",
6072
"gh-pages": "^6.3.0",
6173
"husky": "^9.1.7",
6274
"less": "^4.6.7",
6375
"lint-staged": "^17.0.8",
6476
"prettier": "^3.9.0",
77+
"rc-test": "^7.1.3",
6578
"react": "^19.2.7",
6679
"react-dom": "^19.2.7",
67-
"cross-env": "^10.1.0",
68-
"rc-test": "^7.1.3",
69-
"typescript": "^6.0.3",
70-
"@eslint/eslintrc": "^3.3.5",
71-
"@eslint/js": "^9.39.4",
72-
"eslint-plugin-react": "^7.37.5",
73-
"eslint-plugin-react-hooks": "^7.1.1",
74-
"eslint-config-prettier": "^10.1.8",
75-
"@babel/eslint-parser": "^7.29.7",
76-
"@babel/eslint-plugin": "^7.29.7",
77-
"@typescript-eslint/eslint-plugin": "^8.62.0",
78-
"@typescript-eslint/parser": "^8.62.0",
79-
"@testing-library/jest-dom": "^6.9.1"
80+
"typescript": "^6.0.3"
8081
},
8182
"peerDependencies": {
8283
"react": ">=16.9.0",

tests/index.spec.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
1+
import { fireEvent } from '@testing-library/dom';
12
import React from 'react';
23
import { KeyCode } from '@rc-component/util';
3-
import { fireEvent, render } from '@testing-library/react';
4+
import { render } from '@testing-library/react';
45
import Switch from '..';
56

67
describe('rc-switch', () => {

0 commit comments

Comments
 (0)