Skip to content

Commit

Permalink
fix failing test
Browse files Browse the repository at this point in the history
  • Loading branch information
drewdaemon committed Aug 3, 2023
1 parent bff8f62 commit f19dd13
Showing 1 changed file with 7 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -971,6 +971,11 @@ describe('MetricVisComponent', function () {
});

it('should report render complete', () => {
jest.spyOn(window, 'requestAnimationFrame').mockImplementation((cb) => {
cb(0);
return 0;
});

const renderCompleteSpy = jest.fn();
const component = shallow(
<MetricVis
Expand All @@ -995,6 +1000,8 @@ describe('MetricVisComponent', function () {
component.find(Settings).props().onRenderChange!(true);

expect(renderCompleteSpy).toHaveBeenCalledTimes(1);

(window.requestAnimationFrame as jest.Mock).mockRestore();
});

it('should convert null values to NaN', () => {
Expand Down

0 comments on commit f19dd13

Please sign in to comment.