You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We had this weird code supporting our React tests that contained async mounting logic (see here).
However, after digging into #16895 with @cjcenizal, the comments or issue didn't help me understand what was happening so I dug in more and found a simpler solution that I think will make this easier to maintain and understand moving forward.
We can replace the three await component.update() calls with:
// Ensure all promises resolve
await new Promise(resolve => process.nextTick(resolve));
// Ensure the state changes are reflected
component.update();
I think this makes more sense and should be more helpful for people looking at this in the future.
We had this weird code supporting our React tests that contained async mounting logic (see here).
However, after digging into #16895 with @cjcenizal, the comments or issue didn't help me understand what was happening so I dug in more and found a simpler solution that I think will make this easier to maintain and understand moving forward.
We can replace the three
await component.update()
calls with:I think this makes more sense and should be more helpful for people looking at this in the future.
cc @jen-huang @bmcconaghy
The text was updated successfully, but these errors were encountered: