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
Fix/solve snapshots tests failing node 18 #15436
Conversation
Codecov ReportBase: 60.48% // Head: 60.48% // No change to project coverage 👍
Additional details and impacted files@@ Coverage Diff @@
## main #15436 +/- ##
=======================================
Coverage 60.48% 60.48%
=======================================
Files 1353 1353
Lines 33202 33202
Branches 6353 6353
=======================================
Hits 20081 20081
Misses 11280 11280
Partials 1841 1841
Flags with carried forward coverage won't be shown. Click here to find out more. Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. ☔ View full report at Codecov. |
const reactIntl = jest.requireActual('react-intl'); | ||
const intl = reactIntl.createIntl({ | ||
locale: 'en', | ||
messages: { |
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.
Could you store these messages as a constant above please and then re-use them in the two cases they are used?
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.
Worth writing a bit of documentation in /docs
under testing/unit
about this? Otherwise people will question why we're mocking react-intl
:)
Could be a second PR to get this one merged though.
@joshuaellis I think I'd prefer to have a FE (sync) discussion about this first. To avoid developers running into this we should find a more global solution to this IMO (e.g. by globally mocking What do you think? |
I think at minimum a code comment should be there with those mocks – plans change, priorities are edited, who's to say when the permanent solution will be found and implemented? And I'd rather have that safety net then loose it! |
32892c2
What does it do?
It solves the problem that we have with node 18.13 running the snapshots test, the problem was the unicode space character
Why is it needed?
Because we have the job related to the frontend unit tests in node 18 failing
How to test it?
You can try to run locally the unit test in node 18.13