react/fixtures
Andrew Clark 06f7b4f43a
`act` should work without mock Scheduler (#21714)
Currently, in a React 18 root, `act` only works if you mock the
Scheduler package. This was because we didn't want to add additional
checks at runtime.

But now that the `act` testing API is dev-only, we can simplify its
implementation.

Now when an update is wrapped with `act`, React will bypass Scheduler
entirely and push its tasks onto a special internal queue. Then, when
the outermost `act` scope exists, we'll flush that queue.

I also removed the "wrong act" warning, because the plan is to move
`act` to an isomorphic entry point, simlar to `startTransition`. That's
not directly related to this PR, but I didn't want to bother
re-implementing that warning only to immediately remove it.

I'll add the isomorphic API in a follow up.

Note that the internal version of `act` that we use in our own tests
still depends on mocking the Scheduler package, because it needs to work
in production. I'm planning to move that implementation to a shared
(internal) module, too.
2021-06-22 14:25:07 -07:00
..
art Upgrade art fixtures to babel 7 (#16235) 2020-07-25 23:43:49 -04:00
attribute-behavior Update outdated links and fix two broken links (#19985) 2020-10-09 02:56:30 +01:00
blocks Remove unstable_createRoot from internal builds (#21698) 2021-06-17 11:29:30 -07:00
concurrent/time-slicing Remove unstable_createRoot from internal builds (#21698) 2021-06-17 11:29:30 -07:00
devtools Remove unstable_createRoot from internal builds (#21698) 2021-06-17 11:29:30 -07:00
dom `act` should work without mock Scheduler (#21714) 2021-06-22 14:25:07 -07:00
eslint Bump Prettier (#17811) 2020-01-09 13:54:11 +00:00
expiration Bump handlebars from 4.0.11 to 4.5.3 in /fixtures/expiration (#17729) 2019-12-30 08:57:08 -08:00
fiber-debugger Rename effect fields (#19755) 2020-09-04 14:34:07 -07:00
fiber-triangle Publish a local release (canary or stable) to NPM (#14260) 2018-11-23 12:37:18 -08:00
fizz-ssr-browser Use the server src files as entry points for the builds/tests (#21683) 2021-06-14 16:23:19 -07:00
flight [Flight] Rename react-transport-... packages to react-server-... (#20403) 2020-12-08 08:08:57 -05:00
flight-browser [Flight] Prevent non-Server imports of aliased Server entrypoints (#20422) 2020-12-10 03:55:38 +00:00
legacy-jsx-runtimes Throw when `act` is used in production (#21686) 2021-06-16 16:29:51 -04:00
nesting Nesting Fixture (#19531) 2020-08-07 02:08:41 +01:00
packaging Remove /dist/ UMD builds (#18473) 2020-04-02 17:52:32 -07:00
scheduler Add test of scheduler overhead (#16260) 2019-08-01 17:13:39 -07:00
ssr Merge /unstable-fizz entry point into /server (#21684) 2021-06-14 18:37:44 -07:00
ssr2 Fix fixture lockfile manually 2021-06-16 00:04:01 +01:00
stacks Fix Component Stacks for IE and Native Classes in Safari (#18575) 2020-04-10 19:39:02 -07:00