Skip to content

Commit

Permalink
remove old chart mock for getSpecId
Browse files Browse the repository at this point in the history
  • Loading branch information
nickofthyme committed Mar 28, 2024
1 parent 72ef15a commit aa5ad14
Show file tree
Hide file tree
Showing 5 changed files with 0 additions and 54 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -30,15 +30,6 @@ import {
Color,
} from '@elastic/charts';

jest.mock('@elastic/charts', () => {
const original = jest.requireActual('@elastic/charts');

return {
...original,
getSpecId: jest.fn(() => {}),
};
});

const numberColumn = (id = 'metric-accessor'): DatatableColumn => ({
id,
name: 'Count of records',
Expand All @@ -51,15 +42,6 @@ const numberColumn = (id = 'metric-accessor'): DatatableColumn => ({
},
});

jest.mock('@elastic/charts', () => {
const original = jest.requireActual('@elastic/charts');

return {
...original,
getSpecId: jest.fn(() => {}),
};
});

const chartsThemeService = chartPluginMock.createSetupContract().theme;
const paletteThemeService = chartPluginMock.createSetupContract().palettes;
const formatService = fieldFormatsServiceMock.createStartContract();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,15 +30,6 @@ import HeatmapComponent from './heatmap_component';
import { LegendSize } from '@kbn/visualizations-plugin/common';
import { FieldFormat } from '@kbn/field-formats-plugin/common';

jest.mock('@elastic/charts', () => {
const original = jest.requireActual('@elastic/charts');

return {
...original,
getSpecId: jest.fn(() => {}),
};
});

const actWithTimeout = (action: Function, timer: number = 1) =>
act(
() =>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,15 +28,6 @@ import { ChartTypes } from '../../common/types';
import { LegendSize } from '@kbn/visualizations-plugin/common';
import { cloneDeep } from 'lodash';

jest.mock('@elastic/charts', () => {
const original = jest.requireActual('@elastic/charts');

return {
...original,
getSpecId: jest.fn(() => {}),
};
});

const actWithTimeout = (action: Function, timer: number = 1) =>
act(
() =>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,15 +23,6 @@ import { createMockBucketColumns, createMockVisData } from '../mocks';
const bucketColumns = createMockBucketColumns();
const visData = createMockVisData();

jest.mock('@elastic/charts', () => {
const original = jest.requireActual('@elastic/charts');

return {
...original,
getSpecId: jest.fn(() => {}),
};
});

describe('LegendColorPickerWrapper', () => {
const mockState = new Map();
const uiState = {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,15 +23,6 @@ import { LEGACY_LIGHT_THEME, LEGACY_DARK_THEME } from '@elastic/charts';

jest.mock('../../lib/kibana');

jest.mock('@elastic/charts', () => {
const original = jest.requireActual('@elastic/charts');

return {
...original,
getSpecId: jest.fn(() => {}),
};
});

describe('WrappedByAutoSizer', () => {
it('should render correct default height', () => {
const wrapper = shallow(<WrappedByAutoSizer />);
Expand Down

0 comments on commit aa5ad14

Please sign in to comment.