From 1bd6b3917f5f5aa3703211905614bd88a5e182a9 Mon Sep 17 00:00:00 2001 From: Stratoula Kalafateli Date: Wed, 17 Jun 2020 11:00:28 +0300 Subject: [PATCH] changes in test implementation --- .../application/components/color_picker.test.tsx | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) diff --git a/src/plugins/vis_type_timeseries/public/application/components/color_picker.test.tsx b/src/plugins/vis_type_timeseries/public/application/components/color_picker.test.tsx index 5fa90d589ac02..ca8750a991d83 100644 --- a/src/plugins/vis_type_timeseries/public/application/components/color_picker.test.tsx +++ b/src/plugins/vis_type_timeseries/public/application/components/color_picker.test.tsx @@ -24,18 +24,14 @@ import { ReactWrapper } from 'enzyme'; import { EuiColorPicker, EuiIconTip } from '@elastic/eui'; describe('ColorPicker', () => { - let defaultProps: ColorPickerProps; + const defaultProps: ColorPickerProps = { + name: 'color', + value: null, + onChange: jest.fn(), + disableTrash: true, + }; let component: ReactWrapper; - beforeAll(() => { - defaultProps = { - name: 'color', - value: null, - onChange: jest.fn(), - disableTrash: true, - }; - }); - it('should render the EuiColorPicker', () => { component = mount(); expect(component.find(EuiColorPicker).length).toBe(1);