react/scripts/jest
Sunil Pai a1dbb852c2 warn if you try to use act() in prod (#16282)
We have behaviour divergence for act() between prod and dev (specifically, act() + concurrent mode does not flush fallbacks in prod. This doesn't affect anyone in OSS yet)

We also don't have a good story for writing tests in prod (and what from what I gather, nobody really writes tests in prod mode).

We could have wiped out act() in prod builds, except that _we_ ourselves use act() for our tests when we run them in prod mode.

This PR is a compromise to all of this. We will log a warning if you try to use act() in prod mode, and we silence it in our test suites.
2019-08-05 13:01:05 -07:00
..
matchers Prefix mock Scheduler APIs with _unstable (#15999) 2019-06-26 12:16:08 -07:00
spec-equivalence-reporter Interaction tracing works across hidden and SSR hydration boundaries (#15872) 2019-06-14 18:08:23 -07:00
typescript Enforce presence or absence of component stack in tests (#13215) 2018-07-16 20:20:18 +01:00
config.base.js chore: use jest-serializer-raw for react-fresh snapshots (#15806) 2019-06-03 12:46:33 -07:00
config.build.js [Fire] Remove unused React fire fork (#16046) 2019-07-03 11:05:28 +01:00
config.source-persistent.js Run persistent mode tests in CI (#15029) 2019-03-11 10:56:34 -07:00
config.source.js Resolve host configs at build time (#12792) 2018-05-19 11:29:11 +01:00
dont-run-jest-directly.js Add error when running jest directly (#12726) 2018-05-01 12:46:17 -07:00
noHaste.js Forbid Haste in Jest (#11647) 2017-11-23 18:02:47 +00:00
preprocessor.js Include full error messages in React Native build (#15363) 2019-04-09 16:40:19 -07:00
setupEnvironment.js Interaction tracking follow up (#13509) 2018-09-01 12:00:00 -07:00
setupHostConfigs.js Add new mock build of Scheduler with flush, yield API (#14964) 2019-02-26 20:51:17 -08:00
setupTests.build.js Add new mock build of Scheduler with flush, yield API (#14964) 2019-02-26 20:51:17 -08:00
setupTests.js Construct Error at invariant call site for clearer stack traces (#15877) 2019-06-18 11:38:33 -07:00
setupTests.persistent.js Run persistent mode tests in CI (#15029) 2019-03-11 10:56:34 -07:00
shouldIgnoreConsoleError.js warn if you try to use act() in prod (#16282) 2019-08-05 13:01:05 -07:00