Skip to content

Commit

Permalink
Fixed tests
Browse files Browse the repository at this point in the history
  • Loading branch information
VladLasitsa committed Sep 25, 2020
1 parent 23634a6 commit a96d784
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ describe('MetricsAxisOptions component', () => {
},
});

expect(defaultProps.vis.setState).toHaveBeenLastCalledWith({ type: ChartTypes.LINE });
expect(setValue).toHaveBeenLastCalledWith('type', ChartTypes.LINE);
});

it('should set histogram visType when multiple seriesParam', () => {
Expand All @@ -160,7 +160,7 @@ describe('MetricsAxisOptions component', () => {
},
});

expect(defaultProps.vis.setState).toHaveBeenLastCalledWith({ type: ChartTypes.HISTOGRAM });
expect(setValue).toHaveBeenLastCalledWith('type', ChartTypes.HISTOGRAM);
});
});

Expand Down Expand Up @@ -193,7 +193,7 @@ describe('MetricsAxisOptions component', () => {
const updatedSeriesParams = [{ ...chart, data: { ...chart.data, label: agg.makeLabel() } }];
const updatedValues = [{ ...axis, title: { text: agg.makeLabel() } }];

expect(setValue).toHaveBeenCalledTimes(5);
expect(setValue).toHaveBeenCalledTimes(6);
expect(setValue).toHaveBeenNthCalledWith(3, SERIES_PARAMS, updatedSeriesParams);
expect(setValue).toHaveBeenNthCalledWith(5, SERIES_PARAMS, updatedSeriesParams);
expect(setValue).toHaveBeenNthCalledWith(4, VALUE_AXES, updatedValues);
Expand Down

0 comments on commit a96d784

Please sign in to comment.