Skip to content

Commit

Permalink
Mock Schemas in vis_type_metric
Browse files Browse the repository at this point in the history
  • Loading branch information
sulemanof committed Mar 18, 2020
1 parent 895c69b commit b68ab0b
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 30 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -23,21 +23,8 @@ import { functionWrapper } from '../../../../plugins/expressions/common/expressi

jest.mock('ui/new_platform');

jest.mock('../../vis_default_editor/public/legacy_imports', () => ({
propFilter: jest.fn(),
AggGroupNames: {
Buckets: 'buckets',
Metrics: 'metrics',
},
aggTypeFilters: {
addFilter: jest.fn(),
},
BUCKET_TYPES: {
DATE_HISTOGRAM: 'date_histogram',
},
METRIC_TYPES: {
TOP_HITS: 'top_hits',
},
jest.mock('../../vis_default_editor/public', () => ({
Schemas: class {},
}));

describe('interpreter/functions#metric', () => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,21 +36,8 @@ import { createMetricVisTypeDefinition } from './metric_vis_type';

jest.mock('ui/new_platform');

jest.mock('../../vis_default_editor/public/legacy_imports', () => ({
propFilter: jest.fn(),
AggGroupNames: {
Buckets: 'buckets',
Metrics: 'metrics',
},
aggTypeFilters: {
addFilter: jest.fn(),
},
BUCKET_TYPES: {
DATE_HISTOGRAM: 'date_histogram',
},
METRIC_TYPES: {
TOP_HITS: 'top_hits',
},
jest.mock('../../vis_default_editor/public', () => ({
Schemas: class {},
}));

describe('metric_vis - createMetricVisTypeDefinition', () => {
Expand Down

0 comments on commit b68ab0b

Please sign in to comment.