Skip to content

Commit 55a5b44

Browse files
committed
Fix lint warnings in tests
1 parent bba0307 commit 55a5b44

File tree

19 files changed

+23
-30
lines changed

19 files changed

+23
-30
lines changed

packages/react-jsx-highcharts/test/components/Annotation/Annotation.spec.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ describe('<Annotation />', () => {
1212
beforeEach(() => {
1313
testContext = {};
1414

15-
const { chartStubs, needsRedraw } = createMockProvidedChart();
15+
const { chartStubs } = createMockProvidedChart();
1616
chartStubs.addAnnotation = jest.fn();
1717
chartStubs.removeAnnotation = jest.fn();
1818
testContext.chartStubs = chartStubs;

packages/react-jsx-highcharts/test/components/BaseChart/BaseChart.spec.js

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -71,18 +71,14 @@ describe('<BaseChart />', () => {
7171
it('should create a angular chart when mounted with the gauge prop', () => {
7272
expect(chart.angular).toBeFalsy();
7373

74-
const wrapper = render(
75-
<BaseChart gauge {...testContext} chartType="stockChart" />
76-
);
74+
render(<BaseChart gauge {...testContext} chartType="stockChart" />);
7775
expect(chart.angular).toEqual(true);
7876
});
7977

8078
it('should create a polar chart when mounted with the polar prop', () => {
8179
expect(chart.polar).toBeFalsy();
8280

83-
const wrapper = render(
84-
<BaseChart polar {...testContext} chartType="stockChart" />
85-
);
81+
render(<BaseChart polar {...testContext} chartType="stockChart" />);
8682
expect(chart.polar).toBe(true);
8783
});
8884

packages/react-jsx-highcharts/test/components/Chart/Chart.spec.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,7 @@ describe('<Chart />', () => {
161161
});
162162

163163
it('does not update size if both width and height are undefined', () => {
164-
const wrapper = render(<ProvidedChart />);
164+
render(<ProvidedChart />);
165165

166166
expect(testContext.chartStubs.setSize).not.toHaveBeenCalled();
167167
});

packages/react-jsx-highcharts/test/components/Credits/Credits.spec.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import * as React from 'react';
22
import { render } from '@testing-library/react';
33

4-
import { createMockProvidedChart, Highcharts } from '../../test-utils';
4+
import { createMockProvidedChart } from '../../test-utils';
55
import Credits from '../../../src/components/Credits/Credits';
66
import ChartContext from '../../../src/components/ChartContext';
77

@@ -11,7 +11,7 @@ describe('<Credits />', () => {
1111

1212
beforeEach(() => {
1313
testContext = {};
14-
const { chartStubs, needsRedraw } = createMockProvidedChart();
14+
const { chartStubs } = createMockProvidedChart();
1515
testContext.chartStubs = chartStubs;
1616

1717
ProvidedCredits = props => (

packages/react-jsx-highcharts/test/components/Series/Series.integration.spec.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ describe('<Series /> integration', () => {
3939
it('fires onHide eventhandler', () => {
4040
const onHide = jest.fn();
4141

42-
const wrapper = render(<Component onHide={onHide} />);
42+
render(<Component onHide={onHide} />);
4343
seriesRef.current.object.hide();
4444
expect(onHide).toHaveBeenCalled();
4545
});

packages/react-jsx-highcharts/test/components/Series/SeriesTypes.integration.spec.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ const noAxisSeries = [
6767
'VennSeries',
6868
'PackedBubbleSeries'
6969
];
70-
const needParentSeries = ['BellCurveSeries', 'HistogramSeries', 'ParetoSeries'];
70+
//const needParentSeries = ['BellCurveSeries', 'HistogramSeries', 'ParetoSeries'];
7171

7272
Object.keys(all)
7373
.filter(name => /^[A-Z].*Series$/.test(name))

packages/react-jsx-highcharts/test/components/Subtitle/Subtitle.spec.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ describe('<Subtitle />', () => {
1111

1212
beforeEach(() => {
1313
testContext = {};
14-
const { chartStubs, needsRedraw } = createMockProvidedChart();
14+
const { chartStubs } = createMockProvidedChart();
1515
testContext.chartStubs = chartStubs;
1616

1717
ProvidedSubtitle = props => (

packages/react-jsx-highcharts/test/components/Tooltip/Tooltip.spec.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ describe('<Tooltip />', () => {
1212
beforeEach(() => {
1313
testContext = {};
1414

15-
const { chartStubs, needsRedraw } = createMockProvidedChart();
15+
const { chartStubs } = createMockProvidedChart();
1616

1717
testContext.chartStubs = chartStubs;
1818
testContext.chart = {};

packages/react-jsx-highcharts/test/components/UseAxis/useAxis.spec.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ describe('useAxis', () => {
3636
});
3737

3838
it('should return axis from context', () => {
39-
const wrapper = render(
39+
render(
4040
<AxisContext.Provider value={testAxis}>
4141
<ChildComponent />
4242
</AxisContext.Provider>
@@ -46,7 +46,7 @@ describe('useAxis', () => {
4646
});
4747

4848
it('should return axis outside the context', () => {
49-
const wrapper = render(
49+
render(
5050
<ChartContext.Provider value={testChart}>
5151
<ChildComponent axisId="myAxisId" />
5252
</ChartContext.Provider>

packages/react-jsx-highcharts/test/components/UseChartUpdate/useChartUpdate.spec.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ describe('useChartUpdate', () => {
3131
});
3232

3333
it('should call update function on mount', () => {
34-
const wrapper = render(<ProvidedChartComponent firstProp="first" />);
34+
render(<ProvidedChartComponent firstProp="first" />);
3535

3636
expect(updateFn).toHaveBeenCalledWith(testChart, { firstProp: 'first' });
3737
expect(destroyFn).not.toHaveBeenCalled();

0 commit comments

Comments
 (0)