Skip to content

Commit

Permalink
Fix test
Browse files Browse the repository at this point in the history
  • Loading branch information
maryam-saeidi committed Mar 10, 2023
1 parent 28218d1 commit 0f22e44
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ const mockResponse = {
};

jest.mock('../hooks/use_metrics_explorer_chart_data', () => ({
useMetricsExplorerChartData: () => ({ loading: false, data: mockResponse }),
useMetricsExplorerChartData: () => ({ loading: false, data: { pages: [mockResponse] } }),
}));

describe('ExpressionChart', () => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ export const ExpressionChart: React.FC<Props> = ({
}

const isDarkMode = uiSettings?.get('theme:darkMode') || false;
const firstSeries = first(first(data.pages)!.series)!;
const firstSeries = first(first(data.pages)!.series);
// Creating a custom series where the ID is changed to 0
// so that we can get a proper domain
if (!firstSeries || !firstSeries.rows || firstSeries.rows.length === 0) {
Expand Down

0 comments on commit 0f22e44

Please sign in to comment.