Conversation
4a0fe9d to
78e1065
Compare
|
tests seem to be failing on node 14.x due to |
1aae679 to
bb7cfbe
Compare
|
update I pulled the react 17 upgrade out of this PR as there were some non react-testing related issues I'd like to sort out separately. I'll be updating the description to be more reflective shortly. |
BPScott
left a comment
There was a problem hiding this comment.
Remember to update the react/react-dom peer deps to "^16.8.0 || ^17.0.0".
What's our plan for updating the version of react installed in development? Keep it at 16.whatever for now?
packages/react-testing/src/compat.ts
Outdated
| @@ -0,0 +1,11 @@ | |||
| import {ReactInstance, Fiber} from './types'; | |||
|
|
|||
| export function getInternalFiber(instance: ReactInstance): Fiber { | |||
There was a problem hiding this comment.
Silly nitpick - perhaps run with the most recent name getInternals so our terminology matches the most recent react naming
|
|
||
| ### What versions of React does this support? | ||
|
|
||
| The React versions this library supports are spelled out via a [peer dependency in the package.json](https://github.com/Shopify/quilt/blob/main/packages/react-testing/package.json#L47-L47) |
There was a problem hiding this comment.
Looks like we need to update the react/react-dom peer deps to "^16.8.0 || ^17.0.0"
There was a problem hiding this comment.
Oh I must have reverted the range expansion when I pulled out the react upgrade, oops
… to ensure backwards compatibility is maintained
b40a3a3 to
e8af60a
Compare
I originally had that rolled into this PR but it broke a couple other things, so my current plan is to fix those as individual PRs and then do one to upgrade. |
BPScott
left a comment
There was a problem hiding this comment.
Love how straightforward this was :D
closes #1955
Description
This PR adds support to react-17 to
@shopify/react-testingFull breakdown
react-reconcilerto latest@shopify/react-testingusing a renamed internal property by making it work for both React 16 and 17react-testing's stated version supportTophatting
The tests should be sufficient, but if you want you can yalc this version of react-testing into another app (eg. Shrink-Ray) and run the test suite there to verify it works with React 16. Next upgrade that repo to React 17 and run the tests again. Things should work swimmingly there too.
You can also use locally upgrade to react-17 and then run
yarn test react-testingand ensure that those tests work (though others in the repo will break)Checklist