-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
chore: Fix tests #1288
chore: Fix tests #1288
Conversation
This pull request is automatically built and testable in CodeSandbox. To see build info of the built libraries, click here or the icon next to each commit SHA. Latest deployment of this branch, based on commit c4b23e4:
|
@@ -29,9 +29,12 @@ SOFTWARE. | |||
/* eslint-disable func-names */ | |||
/* eslint-disable complexity */ | |||
const util = require('util') | |||
const jestDiff = require('jest-diff').default | |||
const jestDiff = require('jest-diff').diff |
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.
No idea why this ever worked. It didn't change in jest-diff
between 29.4.1 and 29.7.0 so it must have been some other thing that made it work incidentally.
58345d3
to
013c14c
Compare
This reverts commit b64436c.
Will fix codecov in a follow-up. Manual inspection shows 100%: https://app.codecov.io/github/testing-library/react-testing-library/commit/c4b23e4fd087fd27b95b2051de5fe156f7a07523 |
? [ | ||
"Warning: ReactDOM.render is no longer supported in React 18. Use createRoot instead. Until you switch to the new API, your app will behave as if it's running React 17. Learn more: https://react.dev/link/switch-to-createroot", | ||
] | ||
: [ |
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.
Do we really need this? the reactjs.org link has a redirect to the react.dev one. Is this some sort of preparation for future stuff?
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.
That's what React is logging
@@ -3,6 +3,13 @@ import ReactDOM from 'react-dom' | |||
import ReactDOMServer from 'react-dom/server' | |||
import {fireEvent, render, screen, configure} from '../' | |||
|
|||
// Needs to be changed to 19.0.0 once alpha started. | |||
const isReactExperimental = React.version.startsWith('18.3.0-experimental') | |||
const isReactCanary = React.version.startsWith('18.3.0') |
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.
Shouldn't we check for React.version.startsWith('18.3.0-canary')
here?
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.
yep
Fixing
-- https://github.com/testing-library/react-testing-library/actions/runs/8349938959/job/22855248000?pr=1287#step:7:43
Also adjusts to changed warnings in facebook/react#28477