MCPcopy
hub / github.com/facebook/react / assertYieldsWereCleared

Function assertYieldsWereCleared

scripts/jest/matchers/reactTestMatchers.js:23–33  ·  view source on GitHub ↗
(Scheduler, caller)

Source from the content-addressed store, hash-verified

21}
22
23function assertYieldsWereCleared(Scheduler, caller) {
24 const actualYields = Scheduler.unstable_clearLog();
25 if (actualYields.length !== 0) {
26 const error = Error(
27 'The event log is not empty. Call assertLog(...) first.'
28 );
29 Error.captureStackTrace(error, caller);
30 throw error;
31 }
32 assertConsoleLogsCleared();
33}
34
35function toMatchRenderedOutput(ReactNoop, expectedJSX) {
36 if (typeof ReactNoop.getChildrenAsJSX === 'function') {

Callers 1

toMatchRenderedOutputFunction · 0.70

Calls 1

assertConsoleLogsClearedFunction · 0.85

Tested by

no test coverage detected