Skip to content

Commit fd54f55

Browse files
JedWatsonemmatowntarang9211
authored
Remove enzyme (#3989)
* WIP stuff * Things * updated snapshots and tests * more testing * more tests * moved tests to rtl for Creatable * fixed eslint errors * updated StateManaged snapshot and basic test * first pass at StateManaged * wip tests * wip tests * Finish StateManaged * Fix some things * Nearly done Select.test.js * AsyncCreatable done * Async tests * Upgrade node on CI * Try again * Linting * Fix last tests * Setting nvmrc to 12 and re-adding lint-staged * Update config.yml * Fix babel config * Remove loose on babel preset env becasue it's breaking tests for Reasons Co-authored-by: mitchellhamilton <[email protected]> Co-authored-by: Tarang Hirani <[email protected]>
1 parent c8d74bd commit fd54f55

19 files changed

+3830
-4755
lines changed

.circleci/config.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ version: 2
22

33
docker_defaults: &docker_defaults
44
docker:
5-
- image: cypress/base:8
5+
- image: cypress/base:13.6.0
66
environment:
77
TERM: xterm
88
working_directory: ~/project/repo
@@ -17,7 +17,7 @@ install_steps: &install_steps
1717
- restore_cache:
1818
name: Restore node_modules cache
1919
keys:
20-
- dependency-cache-{{ .Branch }}-{{ checksum "package.json" }}
20+
- dependency-cache-{{ .Branch }}-{{ checksum "yarn.lock" }}
2121
- dependency-cache-{{ .Branch }}-
2222
- dependency-cache-
2323
- run:

.nvmrc

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
10
1+
12

babel.config.js

+2-5
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,7 @@ module.exports = {
22
plugins: [
33
'emotion',
44
['@babel/plugin-proposal-class-properties', { loose: true }],
5+
'@babel/plugin-transform-runtime',
56
],
6-
presets: [
7-
['@babel/preset-env', { loose: true }],
8-
'@babel/preset-react',
9-
'@babel/preset-flow',
10-
],
7+
presets: ['@babel/preset-env', '@babel/preset-react', '@babel/preset-flow'],
118
};

docs/package.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -34,9 +34,9 @@
3434
"pretty-proptypes": "^0.5.0",
3535
"raf-schd": "^2.1.0",
3636
"raw-loader": "^2.0.0",
37-
"react": "^16.8.0",
37+
"react": "^16.13.0",
3838
"react-codesandboxer": "^2.0.1",
39-
"react-dom": "^16.8.0",
39+
"react-dom": "^16.13.0",
4040
"react-helmet": "^5.2.0",
4141
"react-markings": "^1.3.0",
4242
"react-router-dom": "^4.2.2",

enzymeAdapter.setup.js

-4
This file was deleted.

package.json

+13-10
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,9 @@
1515
"@atlaskit/modal-dialog": "^4.0.3",
1616
"@atlaskit/spinner": "^5.0.0",
1717
"@atlaskit/tooltip": "^9.1.4",
18-
"@babel/cli": "^7.0.0",
1918
"@babel/core": "^7.2.2",
2019
"@babel/plugin-proposal-class-properties": "^7.2.3",
20+
"@babel/plugin-transform-runtime": "^7.8.3",
2121
"@babel/polyfill": "^7.0.0",
2222
"@babel/preset-env": "^7.0.0",
2323
"@babel/preset-flow": "^7.0.0",
@@ -28,13 +28,17 @@
2828
"@emotion/cache": "^10.0.9",
2929
"@emotion/core": "^10.0.9",
3030
"@emotion/css": "^10.0.9",
31+
"@preconstruct/cli": "^1.0.0",
32+
"@testing-library/dom": "7.0.4",
33+
"@testing-library/jest-dom": "5.1.1",
34+
"@testing-library/react": "10.0.1",
35+
"@testing-library/user-event": "^10.0.0",
3136
"babel-core": "^7.0.0-bridge.0",
3237
"babel-eslint": "^9.0.0",
3338
"babel-jest": "^23.6.0",
3439
"babel-loader": "^8.0.0",
3540
"babel-plugin-emotion": "^10.0.9",
3641
"bolt-check": "^0.3.0",
37-
"bundlesize": "^0.17.0",
3842
"chroma-js": "^1.3.6",
3943
"chrono-node": "^1.3.5",
4044
"codesandboxer": "^0.1.1",
@@ -55,21 +59,20 @@
5559
"flow-bin": "^0.91.0",
5660
"gh-pages": "^1.1.0",
5761
"html-webpack-plugin": "^3.2.0",
58-
"jest": "^24.8.0",
62+
"jest": "^25.1.0",
5963
"jest-emotion": "^10.0.11",
6064
"jest-in-case": "^1.0.2",
6165
"memoize-one": "^5.0.0",
6266
"moment": "^2.20.1",
6367
"node-fetch": "^2.5.0",
64-
"@preconstruct/cli": "^1.0.0",
6568
"pretty-proptypes": "^0.5.0",
6669
"prop-types": "^15.6.0",
6770
"raf": "^3.4.0",
6871
"raf-schd": "^2.1.0",
6972
"raw-loader": "^2.0.0",
70-
"react": "^16.8.0",
73+
"react": "^16.13.0",
7174
"react-codesandboxer": "^2.0.1",
72-
"react-dom": "^16.8.0",
75+
"react-dom": "^16.13.0",
7376
"react-helmet": "^5.2.0",
7477
"react-input-autosize": "^2.2.2",
7578
"react-markings": "^1.3.0",
@@ -96,8 +99,8 @@
9699
"e2e": "concurrently --kill-others --success=first --names 'SERVER,E2E' 'yarn start --progress=false --no-info' 'yarn test:cypress'",
97100
"test:cypress": "cypress run --spec ./cypress/integration/select_spec.js",
98101
"test:cypress-watch": "node ./node_modules/.bin/cypress open",
99-
"precommit": "flow check && lint-staged",
100-
"postinstall": "preconstruct dev && bolt-check",
102+
"precommit": "flow check",
103+
"postinstall": "preconstruct dev",
101104
"changeset": "changeset",
102105
"version-packages": "changeset version",
103106
"release": "yarn build && changeset publish"
@@ -121,8 +124,8 @@
121124
"./node_modules"
122125
],
123126
"testRegex": "src/*(/(__tests?__/)([^_].*/)*?[^_][^/]*?\\.(test|spec)?\\.(js?))$",
124-
"setupFiles": [
125-
"./enzymeAdapter.setup.js"
127+
"setupFilesAfterEnv": [
128+
"./test-setup.js"
126129
],
127130
"snapshotSerializers": [
128131
"jest-emotion"

packages/react-select/package.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,8 @@
2323
"enzyme": "^3.8.0",
2424
"enzyme-to-json": "^3.3.0",
2525
"jest-in-case": "^1.0.2",
26-
"react": "^16.8.0",
27-
"react-dom": "^16.8.0"
26+
"react": "^16.13.0",
27+
"react-dom": "^16.13.0"
2828
},
2929
"peerDependencies": {
3030
"react": "^16.8.0",

0 commit comments

Comments
 (0)