Skip to content

Commit

Permalink
fix: remove test on removed function
Browse files Browse the repository at this point in the history
  • Loading branch information
markov00 committed Jan 2, 2020
1 parent 210881b commit 7e00f5b
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 24 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,6 @@ import {
checkIfAllValuesAreZero,
getChartHeight,
getChartWidth,
getSeriesStyle,
SeriesType,
WrappedByAutoSizer,
useBrowserTimeZone,
useTheme,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,6 @@ import {
defaultChartHeight,
getChartHeight,
getChartWidth,
getSeriesStyle,
SeriesType,
WrappedByAutoSizer,
ChartSeriesData,
useTheme,
Expand All @@ -41,26 +39,6 @@ describe('WrappedByAutoSizer', () => {
});
});

describe('getSeriesStyle', () => {
it('should not create style mapping if color is not given', () => {
const mockSeriesKey = 'mockSeriesKey';
const color = '';
const customSeriesColors = getSeriesStyle(mockSeriesKey, color, SeriesType.BAR);
expect(customSeriesColors).toBeUndefined();
});

it('should create correct style mapping for series of a chart', () => {
const mockSeriesKey = 'mockSeriesKey';
const color = 'red';
const customSeriesColors = getSeriesStyle(mockSeriesKey, color, SeriesType.BAR);
const expectedKey = { colorValues: [mockSeriesKey] };
customSeriesColors!.forEach((value, key) => {
expect(JSON.stringify(key)).toEqual(JSON.stringify(expectedKey));
expect(value).toEqual(color);
});
});
});

describe('getChartHeight', () => {
it('should render customHeight', () => {
const height = getChartHeight(10, 100);
Expand Down

0 comments on commit 7e00f5b

Please sign in to comment.