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 b7e1bb9 commit a1912af
Show file tree
Hide file tree
Showing 4 changed files with 580 additions and 9 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 a1912af

Please sign in to comment.