Skip to content

Commit 1c236d1

Browse files
committed
Fix Profiler tests in prod
1 parent c963275 commit 1c236d1

1 file changed

Lines changed: 2 additions & 3 deletions

File tree

packages/react/src/__tests__/ReactProfiler-test.internal.js

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -258,7 +258,6 @@ describe('Profiler', () => {
258258
expect(callback).toHaveBeenCalledTimes(1);
259259
});
260260

261-
// TODO: Figure out how to write this without dependency injection
262261
it('does not record times for components outside of Profiler tree', () => {
263262
// Mock the Scheduler module so we can track how many times the current
264263
// time is read
@@ -276,8 +275,8 @@ describe('Profiler', () => {
276275
});
277276

278277
jest.resetModules();
279-
Scheduler = require('scheduler');
280-
ReactTestRenderer = require('react-test-renderer');
278+
279+
loadModules({enableSchedulerTracing});
281280

282281
// Clear yields in case the current time is read during initialization.
283282
Scheduler.unstable_clearYields();

0 commit comments

Comments
 (0)