react/scripts
Andrew Clark 83643778bd
Internal test helpers: Use Node's MessageChannel to queue task (#26345)
To wait for the microtask queue to empty, our internal test helpers
schedule an arbitrary task using `setImmediate`. It doesn't matter what
kind of task it is, only that it's a separate task from the current one,
because by the time it fires, the microtasks for the current event will
have already been processed.

The issue with `setImmediate` is that Jest mocks it. Which can lead to
weird behavior.

I've changed it to instead use a message event, via the MessageChannel
implementation exposed by the `node:worker_threads` module.

We should consider doing this in the public implementation of `act`,
too.
2023-03-08 15:04:38 -05:00
..
babel Upgrade prettier (#26081) 2023-01-31 08:25:05 -05:00
bench Upgrade prettier (#26081) 2023-01-31 08:25:05 -05:00
circleci Add snapshot testing on e2e test failure (#24672) 2022-06-06 10:36:58 -07:00
devtools Bypass packages that are already published when confirmed by users (#26141) 2023-02-10 11:28:31 -05:00
error-codes [Float][Fiber] implement a faster hydration match for hoistable elements (#26154) 2023-03-06 19:52:35 -08:00
eslint [Codemod] Update copyright header to Meta (#25315) 2022-10-18 11:19:24 -04:00
eslint-rules Upgrade prettier (#26081) 2023-01-31 08:25:05 -05:00
flow Internal test helpers: Use Node's MessageChannel to queue task (#26345) 2023-03-08 15:04:38 -05:00
git Remove leftover env variable logic in pre-commit hook 2015-09-01 14:35:47 -07:00
jest SchedulerMock.unstable_yieldValue -> SchedulerMock.log (#26312) 2023-03-06 11:09:07 -05:00
perf-counters [Codemod] Update copyright header to Meta (#25315) 2022-10-18 11:19:24 -04:00
prettier Upgrade prettier (#26081) 2023-01-31 08:25:05 -05:00
print-warnings Upgrade prettier (#26081) 2023-01-31 08:25:05 -05:00
release SchedulerMock.unstable_yieldValue -> SchedulerMock.log (#26312) 2023-03-06 11:09:07 -05:00
rollup Use content hash for facebook-www builds (#26331) 2023-03-06 17:13:17 -05:00
shared Split out Edge and Node implementations of the Flight Client (#26187) 2023-02-21 13:18:24 -05:00
tasks Bug: yarn flow dom does not exist, so console should suggest yarn flow dom-node (#26213) 2023-02-21 21:30:34 +01:00
yarn chore: upgrade to jest 24 (#15778) 2019-10-03 22:44:18 +05:30
authors AUTHORS 2013-09-09 23:42:54 -07:00