mirror of
https://github.com/facebook/react.git
synced 2025-11-01 09:12:30 +00:00
fix tests
This commit is contained in:
@@ -648,9 +648,10 @@ export function dispatchEventForPluginEventSystem(
|
||||
// Special case: Flush continuous updates before the capture phase of a discrete event.
|
||||
if (
|
||||
eventSystemFlags & IS_CAPTURE_PHASE &&
|
||||
node !== null &&
|
||||
getCurrentUpdatePriority() === DiscreteEventPriority
|
||||
) {
|
||||
const root: ?FiberRoot = node?.stateNode;
|
||||
const root: ?FiberRoot = node.stateNode;
|
||||
if (root != null) {
|
||||
flushPendingContinuousUpdates(root);
|
||||
}
|
||||
|
||||
@@ -1280,8 +1280,10 @@ describe('DOMPluginEventSystem', () => {
|
||||
);
|
||||
}
|
||||
const root = ReactDOMClient.createRoot(container);
|
||||
root.render(<Test />);
|
||||
expect(Scheduler).toFlushAndYieldThrough(['Render:0']);
|
||||
await act(async () => {
|
||||
root.render(<Test />);
|
||||
});
|
||||
expect(Scheduler).toHaveYielded(['Render:0']);
|
||||
const buttonElement = buttonRef.current;
|
||||
|
||||
// Expect the click event to be able to get the latest state value set by mouse over events
|
||||
@@ -3294,5 +3296,5 @@ describe('DOMPluginEventSystem', () => {
|
||||
}
|
||||
|
||||
withEnableLegacyFBSupport(false);
|
||||
// withEnableLegacyFBSupport(true);
|
||||
withEnableLegacyFBSupport(true);
|
||||
});
|
||||
|
||||
@@ -139,6 +139,7 @@ import {
|
||||
claimNextTransitionLane,
|
||||
claimNextRetryLane,
|
||||
includesSyncLane,
|
||||
includesSomeLane,
|
||||
isSubsetOfLanes,
|
||||
mergeLanes,
|
||||
removeLanes,
|
||||
|
||||
Reference in New Issue
Block a user