Skip to content

Commit e4f0774

Browse files
committed
Assert logs cleared when assertYieldsWereCleared
1 parent 6809fa4 commit e4f0774

File tree

4 files changed

+580
-10
lines changed

4 files changed

+580
-10
lines changed

packages/internal-test-utils/ReactInternalTestUtils.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ import {
1717
createLogAssertion,
1818
} from './consoleMock';
1919
export {act} from './internalAct';
20+
const {assertConsoleLogsCleared} = require('internal-test-utils/consoleMock');
2021

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

@@ -29,6 +30,7 @@ function assertYieldsWereCleared(caller) {
2930
Error.captureStackTrace(error, caller);
3031
throw error;
3132
}
33+
assertConsoleLogsCleared();
3234
}
3335

3436
export async function waitForMicrotasks() {

0 commit comments

Comments
 (0)