Skip to content

Commit 5126bac

Browse files
rickhanloniifacebook-github-bot
authored andcommitted
Fix VirtualizedList-test.js (#43377)
Summary: Pull Request resolved: #43377 Fixes `VirtualizedList-test.js`, which assumes fake timers (e.g. using `jest.runAllTimers()` and `jest.runOnlyPendingTimers()`) but did not actually use fake timers. Changelog: [Internal] Reviewed By: yungsters Differential Revision: D54668281 fbshipit-source-id: b14757744bb7a21a4e5573053549c36178826021
1 parent ed32b4b commit 5126bac

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

packages/virtualized-lists/Lists/__tests__/VirtualizedList-test.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,8 @@ import VirtualizedList from '../VirtualizedList';
1414
import React from 'react';
1515
import ReactTestRenderer from 'react-test-renderer';
1616

17+
jest.useFakeTimers();
18+
1719
describe('VirtualizedList', () => {
1820
it('renders simple list', () => {
1921
const component = ReactTestRenderer.create(

0 commit comments

Comments
 (0)