-
-
Notifications
You must be signed in to change notification settings - Fork 2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
add enzyme-adapter-react-17 (no TODO tags) #2534
Open
createthis
wants to merge
18
commits into
enzymejs:master
Choose a base branch
from
createthis:feat/support-react17
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
18 commits
Select commit
Hold shift + click to select a range
b6862d0
[New] add `enzyme-adapter-react-17`
ljharb d26a940
feat: add an adapter for React 17
layershifter 31178a0
add versions to CI
layershifter c6c9150
version updates
layershifter 8a6075b
offscreencomponent wip
ljharb 898978f
test TODOs
ljharb b8c5aed
Remove TODO_17 tags
createthis 388c6c9
Merge remote-tracking branch 'enzymejs/master' into feat/support-react17
createthis 60d857c
Fix two failing tests by using less fragile syntax.
createthis 0a4066c
Fix another test with fragile matching.
createthis 57b3109
componentWillReceiveProps and UNSAFE_componentWillReceiveProps removed
createthis da7b637
Fix shallow() so that it calls componentWillReceiveProps() and
createthis d92c8b7
Forgot a test case. Call componentWillReceiveProps() even when shallow
createthis e4af0b6
displayNameOfNode gets a little wonky when used with React.memo and
createthis 65cbc38
punt on the simulate failure. I worked on this all day yesterday and
createthis 1bde41e
Make a few changes I saw https://github.com/wojtekmaj requested in the
createthis d0aa05b
Add tip from https://github.com/ljharb to CONTRIBUTING
createthis 46d0422
Restore suspense tests to the best of my ability.
createthis File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
{ | ||
"presets": [ | ||
["airbnb", { "transformRuntime": false }], | ||
], | ||
"plugins": [ | ||
["transform-replace-object-assign", { "moduleSpecifier": "object.assign" }], | ||
], | ||
"sourceMaps": "both", | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
../../.eslintignore |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
{ | ||
"extends": "airbnb", | ||
"parser": "babel-eslint", | ||
"root": true, | ||
"rules": { | ||
"max-classes-per-file": 0, | ||
"max-len": 0, | ||
"import/no-extraneous-dependencies": 2, | ||
"import/no-unresolved": 2, | ||
"import/extensions": 2, | ||
"react/no-deprecated": 0, | ||
"react/no-find-dom-node": 0, | ||
"react/no-multi-comp": 0, | ||
"no-underscore-dangle": 0, | ||
"class-methods-use-this": 0 | ||
}, | ||
"settings": { | ||
"react": { | ||
"version": "17", | ||
}, | ||
}, | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
../enzyme/.npmignore |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
../../.npmrc |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,74 @@ | ||
{ | ||
"name": "enzyme-adapter-react-17", | ||
"version": "0.0.0", | ||
"description": "JavaScript Testing utilities for React", | ||
"homepage": "https://enzymejs.github.io/enzyme/", | ||
"main": "build", | ||
"scripts": { | ||
"clean": "rimraf build", | ||
"lint": "eslint --ext js,jsx .", | ||
"pretest": "npm run lint", | ||
"prebuild": "npm run clean", | ||
"build": "babel --source-maps=both src --out-dir build", | ||
"watch": "npm run build -- -w", | ||
"prepublish": "not-in-publish || (npm run build && safe-publish-latest && cp ../../{LICENSE,README}.md ./)" | ||
}, | ||
"repository": { | ||
"type": "git", | ||
"url": "https://github.com/enzymejs/enzyme.git", | ||
"directory": "packages/enzyme-adapter-react-17" | ||
}, | ||
"keywords": [ | ||
"javascript", | ||
"shallow rendering", | ||
"shallowRender", | ||
"test", | ||
"reactjs", | ||
"react", | ||
"flux", | ||
"testing", | ||
"test utils", | ||
"assertion helpers", | ||
"tdd", | ||
"mocha" | ||
], | ||
"author": "Jordan Harband <[email protected]>", | ||
"funding": { | ||
"url": "https://github.com/sponsors/ljharb" | ||
}, | ||
"license": "MIT", | ||
"dependencies": { | ||
"enzyme-adapter-utils": "^1.13.1", | ||
"enzyme-shallow-equal": "^1.0.4", | ||
"has": "^1.0.3", | ||
"object.assign": "^4.1.0", | ||
"object.values": "^1.1.1", | ||
"prop-types": "^15.7.2", | ||
"react-is": "^17.0.0", | ||
"react-reconciler": "^0.26.1", | ||
"react-test-renderer": "^17.0.0", | ||
"semver": "^5.7.0" | ||
}, | ||
"peerDependencies": { | ||
"enzyme": "^3.0.0", | ||
"react": "^17.0.0", | ||
"react-dom": "^17.0.0" | ||
}, | ||
"devDependencies": { | ||
"@babel/cli": "^7.0.0", | ||
"@babel/core": "^7.0.0", | ||
"babel-eslint": "^10.1.0", | ||
"babel-plugin-transform-replace-object-assign": "^2.0.0", | ||
"babel-preset-airbnb": "^4.5.0", | ||
"enzyme": "^3.0.0", | ||
"eslint": "^7.6.0", | ||
"eslint-config-airbnb": "^18.2.0", | ||
"eslint-plugin-import": "^2.22.0", | ||
"eslint-plugin-jsx-a11y": "^6.3.1", | ||
"eslint-plugin-react": "^7.20.5", | ||
"eslint-plugin-react-hooks": "^4.0.8", | ||
"in-publish": "^2.0.1", | ||
"rimraf": "^2.7.1", | ||
"safe-publish-latest": "^1.1.4" | ||
} | ||
} |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Incorporated tips provided by https://github.com/ljharb back into documentation.