-
-
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
Removed react-16.8 from allowed_failures in travis #2122
base: master
Are you sure you want to change the base?
Conversation
@ljharb |
.travis.yml
Outdated
@@ -33,7 +33,7 @@ matrix: | |||
- node_js: "lts/*" | |||
env: REACT=16.8.3 | |||
- node_js: "lts/*" | |||
env: REACT=16.8 RENDERER=16.7 | |||
env: REACT=16.8 RENDERER=16.8 |
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.
this is breaking the purpose of the test, which is to test react 16.8 with the 16.7 renderer.
env: REACT=16.8 RENDERER=16.8 | |
env: REACT=16.8 RENDERER=16.7 |
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.
But we need corresponding version of react and react-dom if there is version mismatch - hooks test will fail as writtern on react website one of reason for invalid hooks is
Mismatching Versions of React and React DOM
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.
react and react-dom will both be 16.8 with this. RENDERER
is about react-test-renderer
, which doesn't necessarily have to match.
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.
ok , then i can use render, fireEvent, getByTestId
for updating the failing test cases?
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.
The work that needs to be done to close the linked issue is to determine if the existing tests are valid - if so, the actual code needs to be fixed; or, if they're not valid, change them so they are valid.
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.
@ljharb I was going through a lot of articles the react-test-renderer before 16.8.5 have problem with shallow rendering for hooks , as they won't re-render after setting State , and we are using same the same in Adaptors so shallow won't work for version below 16.8.5,
now what we should do, modify the adaptor?
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.
yes, ideally we'd modify the react 16 adapter to have fallback behavior for an older renderer version.
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.
@AlokTakshak any interest in pursuing this fix?
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.
I want to but i don't have any clue of how to fix it
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.
My thinking is that the react 16 adapter would add some way (only for react-test-renderer prior to 16.8.5) to catch useState
calls and force a rerender manually.
Codecov Report
@@ Coverage Diff @@
## master #2122 +/- ##
=======================================
Coverage 96.12% 96.12%
=======================================
Files 49 49
Lines 4004 4004
Branches 1123 1123
=======================================
Hits 3849 3849
Misses 155 155 Continue to review full report at Codecov.
|
2227326
to
0d5ead7
Compare
43eb75e
to
39e6b1f
Compare
Closes #2113.