Skip to content

Commit

Permalink
Assert logs cleared when assertYieldsWereCleared
Browse files Browse the repository at this point in the history
  • Loading branch information
rickhanlonii committed Apr 5, 2024
1 parent 6809fa4 commit da409b4
Show file tree
Hide file tree
Showing 4 changed files with 586 additions and 10 deletions.
2 changes: 2 additions & 0 deletions packages/internal-test-utils/ReactInternalTestUtils.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ import {
createLogAssertion,
} from './consoleMock';
export {act} from './internalAct';
const {assertConsoleLogsCleared} = require('internal-test-utils/consoleMock');

import {thrownErrors, actingUpdatesScopeDepth} from './internalAct';

Expand All @@ -29,6 +30,7 @@ function assertYieldsWereCleared(caller) {
Error.captureStackTrace(error, caller);
throw error;
}
assertConsoleLogsCleared();
}

export async function waitForMicrotasks() {
Expand Down
Loading

0 comments on commit da409b4

Please sign in to comment.