We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a5aedd1 commit eed73a7Copy full SHA for eed73a7
packages/internal-test-utils/internalAct.js
@@ -45,6 +45,15 @@ export async function act<T>(scope: () => Thenable<T>): Thenable<T> {
45
);
46
}
47
48
+ const actualYields = Scheduler.unstable_clearLog();
49
+ if (actualYields.length !== 0) {
50
+ const error = Error(
51
+ 'Log of yielded values is not empty. ' + 'Call assertLog first.',
52
+ );
53
+ Error.captureStackTrace(error, act);
54
+ throw error;
55
+ }
56
+
57
// $FlowFixMe[cannot-resolve-name]: Flow doesn't know about global Jest object
58
if (!jest.isMockFunction(setTimeout)) {
59
throw Error(
0 commit comments