Project

General

Profile

Download (758 Bytes) Statistics
| Branch: | Tag: | Revision:
import { testActionSnapshotWithFixtures } from '@theforeman/test';

import { getLineChartConfig } from './LineChartService';
import {
data,
timeseriesData,
} from '../../react_app/components/common/charts/LineChart/LineChart.fixtures';

jest.unmock('./LineChartService');
jest.unmock('./ChartService');

const fixtures = {
'should get regular config': () =>
getLineChartConfig({
data,
config: 'regular',
onclick: () => {},
id: 'klm',
}),
'should get timeseries config': () =>
getLineChartConfig({
data: timeseriesData,
config: 'timeseries',
onclick: () => {},
xAxisDataLabel: 'x',
id: 'pqr',
}),
};

describe('getLineChartConfig', () => testActionSnapshotWithFixtures(fixtures));
(8-8/8)