diff --git a/src/__tests__/suggestions.js b/src/__tests__/suggestions.js index 6c723a65..9d248ae6 100644 --- a/src/__tests__/suggestions.js +++ b/src/__tests__/suggestions.js @@ -6,7 +6,14 @@ beforeAll(() => { configure({throwSuggestions: true}) }) +beforeEach(() => { + // We're testing suggestions of find* queries but we're not interested in their time-related behavior. + // Real timers would make the test suite slower for no reason. + jest.useFakeTimers() +}) + afterEach(() => { + jest.useRealTimers() configure({testIdAttribute: 'data-testid', throwSuggestions: true}) console.warn.mockClear() })