Skip to content

Commit

Permalink
Refactor some code
Browse files Browse the repository at this point in the history
  • Loading branch information
DianaDerevyankina committed Jul 14, 2020
1 parent 866bfe3 commit ebdd4d4
Show file tree
Hide file tree
Showing 6 changed files with 6 additions and 71 deletions.
57 changes: 0 additions & 57 deletions src/plugins/vis_type_vega/public/__mocks__/services.ts

This file was deleted.

20 changes: 6 additions & 14 deletions src/plugins/vis_type_vega/public/vega_visualization.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,9 @@ import 'leaflet/dist/leaflet.js';
import 'leaflet-vega';
import { createVegaVisualization } from './vega_visualization';

import vegaliteGraph from './__test__/vegalite_graph.json';
import vegaGraph from './__test__/vega_graph.json';
import vegaMapGraph from './__test__/vega_map_test.json';
import vegaliteGraph from './test_utils/vegalite_graph.json';
import vegaGraph from './test_utils/vega_graph.json';
import vegaMapGraph from './test_utils/vega_map_test.json';

import { VegaParser } from './data_model/vega_parser';
import { SearchAPI } from './data_model/search_api';
Expand All @@ -44,7 +44,7 @@ import { dataPluginMock } from '../../data/public/mocks';
import { KibanaMap } from '../../maps_legacy/public/map/kibana_map';

jest.mock('./default_spec', () => ({
getDefaultSpec: () => jest.requireActual('./__test__/default.spec.json'),
getDefaultSpec: () => jest.requireActual('./test_utils/default.spec.json'),
}));

jest.mock('./lib/vega', () => ({
Expand Down Expand Up @@ -88,17 +88,9 @@ describe('VegaVisualizations', () => {

beforeEach(() => {
vegaVisualizationDependencies = {
core: {
uiSettings: coreStart.uiSettings,
},
core: coreMock.createSetup(),
plugins: {
data: {
query: {
timefilter: {
timefilter: {},
},
},
},
data: dataPluginMock.createSetupContract(),
},
};

Expand Down

0 comments on commit ebdd4d4

Please sign in to comment.