Skip to content

Commit

Permalink
chore: Move test case to react 18 (#489)
Browse files Browse the repository at this point in the history
* 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
  • Loading branch information
zombieJ authored Jun 26, 2022
1 parent 7a4a215 commit 96e3210
Show file tree
Hide file tree
Showing 20 changed files with 776 additions and 680 deletions.
6 changes: 3 additions & 3 deletions jest.config.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
module.exports = {
setupFiles: ['./tests/setup.js'],
snapshotSerializers: [require.resolve('enzyme-to-json/serializer')],
};
setupFiles: ['<rootDir>/tests/setup.js'],
setupFilesAfterEnv: ['<rootDir>/tests/setupFilesAfterEnv.ts']
};
52 changes: 25 additions & 27 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,37 +9,37 @@
"ui",
"react-menu"
],
"files": [
"es",
"lib",
"assets/*.css",
"assets/*.less"
],
"main": "./lib/index",
"module": "./es/index",
"homepage": "http://github.com/react-component/menu",
"maintainers": [
"yiminghe@gmail.com",
"hualei5280@gmail.com"
],
"bugs": {
"url": "http://github.com/react-component/menu/issues"
},
"repository": {
"type": "git",
"url": "git@github.com:react-component/menu.git"
},
"bugs": {
"url": "http://github.com/react-component/menu/issues"
},
"license": "MIT",
"maintainers": [
"yiminghe@gmail.com",
"hualei5280@gmail.com"
],
"main": "./lib/index",
"module": "./es/index",
"files": [
"es",
"lib",
"assets/*.css",
"assets/*.less"
],
"scripts": {
"start": "dumi dev",
"compile": "father build && lessc assets/index.less assets/index.css",
"coverage": "father test --coverage",
"docs:build": "dumi build",
"docs:deploy": "gh-pages -d .doc",
"compile": "father build && lessc assets/index.less assets/index.css",
"prepublishOnly": "npm run compile && np --yolo --no-publish",
"lint": "eslint src/ --ext .tsx,.ts,.jsx,.js",
"test": "father test",
"coverage": "father test --coverage",
"now-build": "npm run build"
"now-build": "npm run build",
"prepublishOnly": "npm run compile && np --yolo --no-publish",
"start": "dumi dev",
"test": "father test"
},
"dependencies": {
"@babel/runtime": "^7.10.1",
Expand All @@ -51,24 +51,22 @@
"shallowequal": "^1.1.0"
},
"devDependencies": {
"@types/enzyme": "^3.10.8",
"@testing-library/jest-dom": "^5.16.4",
"@testing-library/react": "^13.0.0",
"@types/jest": "^26.0.23",
"@types/react": "^16.8.19",
"@types/react-dom": "^16.8.4",
"@types/warning": "^3.0.0",
"cross-env": "^7.0.0",
"dumi": "^1.1.0",
"enzyme": "^3.3.0",
"enzyme-adapter-react-16": "^1.0.2",
"enzyme-to-json": "^3.4.0",
"eslint": "^7.0.0",
"father": "^2.22.0",
"father-build": "^1.18.6",
"gh-pages": "^3.1.0",
"less": "^3.10.3",
"np": "^6.0.0",
"react": "^16.9.0",
"react-dom": "^16.9.0",
"react": "^18.0.0",
"react-dom": "^18.0.0",
"regenerator-runtime": "^0.13.7",
"typescript": "^4.0.5"
},
Expand Down
Loading

0 comments on commit 96e3210

Please sign in to comment.