Commit ef35ea61 authored by Natalia Tepluhina's avatar Natalia Tepluhina

Merge branch 'xanf-remove-localVue-121742' into 'master'

Remove incorrect localVue usage in spec/frontend/monitoring

Closes #121742

See merge request gitlab-org/gitlab!22580
parents 95889f83 0f60ee2a
import { shallowMount, createLocalVue } from '@vue/test-utils'; import { shallowMount } from '@vue/test-utils';
import { GlColumnChart } from '@gitlab/ui/dist/charts'; import { GlColumnChart } from '@gitlab/ui/dist/charts';
import ColumnChart from '~/monitoring/components/charts/column.vue'; import ColumnChart from '~/monitoring/components/charts/column.vue';
const localVue = createLocalVue();
jest.mock('~/lib/utils/icon_utils', () => ({ jest.mock('~/lib/utils/icon_utils', () => ({
getSvgIconPathContent: jest.fn().mockResolvedValue('mockSvgPathContent'), getSvgIconPathContent: jest.fn().mockResolvedValue('mockSvgPathContent'),
})); }));
...@@ -12,7 +10,7 @@ describe('Column component', () => { ...@@ -12,7 +10,7 @@ describe('Column component', () => {
let columnChart; let columnChart;
beforeEach(() => { beforeEach(() => {
columnChart = shallowMount(localVue.extend(ColumnChart), { columnChart = shallowMount(ColumnChart, {
propsData: { propsData: {
graphData: { graphData: {
metrics: [ metrics: [
...@@ -35,7 +33,6 @@ describe('Column component', () => { ...@@ -35,7 +33,6 @@ describe('Column component', () => {
containerWidth: 100, containerWidth: 100,
}, },
sync: false, sync: false,
localVue,
}); });
}); });
......
import { shallowMount, createLocalVue } from '@vue/test-utils'; import { shallowMount } from '@vue/test-utils';
import EmptyChart from '~/monitoring/components/charts/empty_chart.vue'; import EmptyChart from '~/monitoring/components/charts/empty_chart.vue';
const localVue = createLocalVue();
describe('Empty Chart component', () => { describe('Empty Chart component', () => {
let emptyChart; let emptyChart;
const graphTitle = 'Memory Usage'; const graphTitle = 'Memory Usage';
beforeEach(() => { beforeEach(() => {
emptyChart = shallowMount(localVue.extend(EmptyChart), { emptyChart = shallowMount(EmptyChart, {
propsData: { propsData: {
graphTitle, graphTitle,
}, },
sync: false, sync: false,
localVue,
}); });
}); });
......
import { shallowMount, createLocalVue } from '@vue/test-utils'; import { shallowMount } from '@vue/test-utils';
import SingleStatChart from '~/monitoring/components/charts/single_stat.vue'; import SingleStatChart from '~/monitoring/components/charts/single_stat.vue';
import { graphDataPrometheusQuery } from '../../mock_data'; import { graphDataPrometheusQuery } from '../../mock_data';
const localVue = createLocalVue();
describe('Single Stat Chart component', () => { describe('Single Stat Chart component', () => {
let singleStatChart; let singleStatChart;
beforeEach(() => { beforeEach(() => {
singleStatChart = shallowMount(localVue.extend(SingleStatChart), { singleStatChart = shallowMount(SingleStatChart, {
propsData: { propsData: {
graphData: graphDataPrometheusQuery, graphData: graphDataPrometheusQuery,
}, },
sync: false, sync: false,
localVue,
}); });
}); });
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment