-
Notifications
You must be signed in to change notification settings - Fork 45
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
Migration to React 18 #1044
Migration to React 18 #1044
Conversation
MegaLinter status: ✅ SUCCESS
See errors details in artifact MegaLinter reports on CI Job page |
3065306
to
77f8b1c
Compare
Codecov Report
@@ Coverage Diff @@
## master #1044 +/- ##
=======================================
Coverage 88.59% 88.59%
=======================================
Files 102 102
Lines 1763 1763
Branches 407 407
=======================================
Hits 1562 1562
Misses 201 201
Flags with carried forward coverage won't be shown. Click here to find out more.
|
77f8b1c
to
d847e4f
Compare
act(() => { | ||
store.dispatch(fatalErrorActions.setError({ message: 'dummy-message' })) | ||
}) | ||
|
||
expect(await screen.findByTestId('fatalerror-stacktrace')).toHaveTextContent('dummy-message') |
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.
Without act
it complains Warning: An update to FatalErrorHandler inside a test was not wrapped in act(...).
, but it really should since we're using findBy*
:/
Did react team mess something up?
@@ -42,10 +42,9 @@ describe('loadable', () => { | |||
}) |
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.
Oddly this works:
it('should render fallback if given one', async () => {
const component = render(<LazyComponentWithFallback />)
expect(await screen.findByText(/lazy-loaded/)).toBeInTheDocument()
expect(component.container.firstChild).toMatchSnapshot()
})
but this complains Warning: A suspended resource finished loading inside a test, but the event was not wrapped in act(...).
:
it('should render fallback if given one', async () => {
const component = render(<LazyComponentWithFallback />)
expect(await screen.findByText(/Loading/)).toBeInTheDocument()
expect(component.container.firstChild).toMatchSnapshot()
expect(await screen.findByText(/lazy-loaded/)).toBeInTheDocument()
expect(component.container.firstChild).toMatchSnapshot()
})
9027b8f
to
22380a7
Compare
22380a7
to
cf5af8e
Compare
webext-redux
resolutions
is needed to avoidact
warnings in tests when using userEventsimportAccountsActions.clear()
action had to be moved to saga. This UI part was not working with a new React 18 strict mode