Skip to content

Commit 96e3210

Browse files
authored
chore: Move test case to react 18 (#489)
* chore: init * test: more * test: more and more test * test: keyboard test case * test: menu * test: update snapshot * test: MenuItem test * test: Options test * test: Res test * test: sub test * test: all * chore: cleanup * test: back of res * test: more
1 parent 7a4a215 commit 96e3210

20 files changed

+776
-680
lines changed

jest.config.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
module.exports = {
2-
setupFiles: ['./tests/setup.js'],
3-
snapshotSerializers: [require.resolve('enzyme-to-json/serializer')],
4-
};
2+
setupFiles: ['<rootDir>/tests/setup.js'],
3+
setupFilesAfterEnv: ['<rootDir>/tests/setupFilesAfterEnv.ts']
4+
};

package.json

Lines changed: 25 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -9,37 +9,37 @@
99
"ui",
1010
"react-menu"
1111
],
12-
"files": [
13-
"es",
14-
"lib",
15-
"assets/*.css",
16-
"assets/*.less"
17-
],
18-
"main": "./lib/index",
19-
"module": "./es/index",
2012
"homepage": "http://github.com/react-component/menu",
21-
"maintainers": [
22-
23-
24-
],
13+
"bugs": {
14+
"url": "http://github.com/react-component/menu/issues"
15+
},
2516
"repository": {
2617
"type": "git",
2718
"url": "[email protected]:react-component/menu.git"
2819
},
29-
"bugs": {
30-
"url": "http://github.com/react-component/menu/issues"
31-
},
3220
"license": "MIT",
21+
"maintainers": [
22+
23+
24+
],
25+
"main": "./lib/index",
26+
"module": "./es/index",
27+
"files": [
28+
"es",
29+
"lib",
30+
"assets/*.css",
31+
"assets/*.less"
32+
],
3333
"scripts": {
34-
"start": "dumi dev",
34+
"compile": "father build && lessc assets/index.less assets/index.css",
35+
"coverage": "father test --coverage",
3536
"docs:build": "dumi build",
3637
"docs:deploy": "gh-pages -d .doc",
37-
"compile": "father build && lessc assets/index.less assets/index.css",
38-
"prepublishOnly": "npm run compile && np --yolo --no-publish",
3938
"lint": "eslint src/ --ext .tsx,.ts,.jsx,.js",
40-
"test": "father test",
41-
"coverage": "father test --coverage",
42-
"now-build": "npm run build"
39+
"now-build": "npm run build",
40+
"prepublishOnly": "npm run compile && np --yolo --no-publish",
41+
"start": "dumi dev",
42+
"test": "father test"
4343
},
4444
"dependencies": {
4545
"@babel/runtime": "^7.10.1",
@@ -51,24 +51,22 @@
5151
"shallowequal": "^1.1.0"
5252
},
5353
"devDependencies": {
54-
"@types/enzyme": "^3.10.8",
54+
"@testing-library/jest-dom": "^5.16.4",
55+
"@testing-library/react": "^13.0.0",
5556
"@types/jest": "^26.0.23",
5657
"@types/react": "^16.8.19",
5758
"@types/react-dom": "^16.8.4",
5859
"@types/warning": "^3.0.0",
5960
"cross-env": "^7.0.0",
6061
"dumi": "^1.1.0",
61-
"enzyme": "^3.3.0",
62-
"enzyme-adapter-react-16": "^1.0.2",
63-
"enzyme-to-json": "^3.4.0",
6462
"eslint": "^7.0.0",
6563
"father": "^2.22.0",
6664
"father-build": "^1.18.6",
6765
"gh-pages": "^3.1.0",
6866
"less": "^3.10.3",
6967
"np": "^6.0.0",
70-
"react": "^16.9.0",
71-
"react-dom": "^16.9.0",
68+
"react": "^18.0.0",
69+
"react-dom": "^18.0.0",
7270
"regenerator-runtime": "^0.13.7",
7371
"typescript": "^4.0.5"
7472
},

0 commit comments

Comments
 (0)