Skip to content

Conversation

TuurDutoit
Copy link
Contributor

@TuurDutoit TuurDutoit commented Jul 22, 2024

Checks

Description

This adds a regression test for #665

import { renderHook } from '@testing-library/react-hooks';
import useProfiler from '../hooks/useProfiler';

jest.useFakeTimers();
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The behavior of jest.useFakeTimers() might change depending on the version of Jest and the config we're using here. Alternatively, I could change this to:

global.performance = {
  now: jest.fn().mockReturnValue(0)
}

@TuurDutoit TuurDutoit force-pushed the test/regression-use-profiler-warnings branch from c1ba073 to 44a9700 Compare July 22, 2024 08:37
@TuurDutoit TuurDutoit marked this pull request as ready for review July 22, 2024 08:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant