Skip to content

Commit

Permalink
Mock debounce
Browse files Browse the repository at this point in the history
  • Loading branch information
geido committed Sep 22, 2021
1 parent 1e73ac4 commit f9c4f55
Showing 1 changed file with 6 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,12 @@ import { render, screen } from 'spec/helpers/testing-library';
import userEvent from '@testing-library/user-event';
import TimeSeriesColumnControl from '.';

jest.mock('lodash/debounce', () => (fn: Function & { cancel: Function }) => {
// eslint-disable-next-line no-param-reassign
fn.cancel = jest.fn();
return fn;
});

test('renders with default props', () => {
render(<TimeSeriesColumnControl />);
expect(screen.getByText('Time series columns')).toBeInTheDocument();
Expand Down

0 comments on commit f9c4f55

Please sign in to comment.