From 7e00f5be8e42d2ed2ae9b62783098f8cb331439f Mon Sep 17 00:00:00 2001 From: Marco Vettorello Date: Thu, 2 Jan 2020 18:52:44 +0100 Subject: [PATCH] fix: remove test on removed function --- .../public/components/charts/barchart.tsx | 2 -- .../public/components/charts/common.test.tsx | 22 ------------------- 2 files changed, 24 deletions(-) diff --git a/x-pack/legacy/plugins/siem/public/components/charts/barchart.tsx b/x-pack/legacy/plugins/siem/public/components/charts/barchart.tsx index aa213353869ec..db84d7dbd2c18 100644 --- a/x-pack/legacy/plugins/siem/public/components/charts/barchart.tsx +++ b/x-pack/legacy/plugins/siem/public/components/charts/barchart.tsx @@ -16,8 +16,6 @@ import { checkIfAllValuesAreZero, getChartHeight, getChartWidth, - getSeriesStyle, - SeriesType, WrappedByAutoSizer, useBrowserTimeZone, useTheme, diff --git a/x-pack/legacy/plugins/siem/public/components/charts/common.test.tsx b/x-pack/legacy/plugins/siem/public/components/charts/common.test.tsx index e9df0d3885a18..3748a2505c115 100644 --- a/x-pack/legacy/plugins/siem/public/components/charts/common.test.tsx +++ b/x-pack/legacy/plugins/siem/public/components/charts/common.test.tsx @@ -13,8 +13,6 @@ import { defaultChartHeight, getChartHeight, getChartWidth, - getSeriesStyle, - SeriesType, WrappedByAutoSizer, ChartSeriesData, useTheme, @@ -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);