Commit 6f2f9c15 authored by Illya Klymov's avatar Illya Klymov

Remove incorrect localVue usage in various files

localVue is required only with use method
parent 4372a6c9
......@@ -23,7 +23,7 @@ describe('AlertsServiceForm', () => {
let mockAxios;
const createComponent = (props = defaultProps, { methods } = {}) => {
wrapper = shallowMount(localVue.extend(AlertsServiceForm), {
wrapper = shallowMount(AlertsServiceForm, {
localVue,
propsData: {
...defaultProps,
......
import { createLocalVue, mount } from '@vue/test-utils';
import { mount } from '@vue/test-utils';
import BoardScope from 'ee/boards/components/board_scope.vue';
import { TEST_HOST } from 'helpers/test_constants';
......@@ -7,8 +7,6 @@ describe('BoardScope', () => {
let vm;
beforeEach(() => {
const localVue = createLocalVue();
const propsData = {
collapseScope: false,
canAdminBoard: false,
......@@ -22,7 +20,6 @@ describe('BoardScope', () => {
wrapper = mount(BoardScope, {
propsData,
localVue,
sync: false,
});
......
......@@ -7,7 +7,6 @@ import environments from './mock_data';
const localVue = createLocalVue();
describe('Environments', () => {
const Component = localVue.extend(Environments);
let wrapper;
let propsData;
......@@ -20,7 +19,7 @@ describe('Environments', () => {
isFetching: false,
};
wrapper = mount(Component, {
wrapper = mount(Environments, {
propsData,
localVue,
});
......@@ -43,7 +42,7 @@ describe('Environments', () => {
let table;
beforeAll(() => {
wrapper = mount(Component, {
wrapper = mount(Environments, {
propsData: { ...propsData, environments },
localVue,
stubs: { deploymentInstance: '<div class="js-deployment-instance"></div>' },
......
import { createLocalVue, shallowMount } from '@vue/test-utils';
import { shallowMount } from '@vue/test-utils';
import DesignVersionDropdown from 'ee/design_management/components/upload/design_version_dropdown.vue';
import { GlDropdown, GlDropdownItem } from '@gitlab/ui';
import mockAllVersions from './mock_data/all_versions';
......@@ -6,8 +6,6 @@ import mockAllVersions from './mock_data/all_versions';
const LATEST_VERSION_ID = 3;
const PREVIOUS_VERSION_ID = 2;
const localVue = createLocalVue();
const designRouteFactory = versionId => ({
path: `/designs?version=${versionId}`,
query: {
......@@ -29,7 +27,6 @@ describe('Design management design version dropdown component', () => {
projectPath: '',
issueIid: '',
},
localVue,
mocks: {
$route,
},
......
......@@ -12,7 +12,7 @@ describe('noteActions', () => {
let props;
const createWrapper = propsData =>
shallowMount(localVue.extend(noteActions), {
shallowMount(noteActions, {
store,
propsData,
localVue,
......
......@@ -10,7 +10,7 @@ describe('project header component', () => {
let wrapper;
const factory = () => {
wrapper = shallowMount(localVue.extend(ProjectHeader), {
wrapper = shallowMount(ProjectHeader, {
propsData: {
project: mockOneProject,
},
......
import { shallowMount, createLocalVue } from '@vue/test-utils';
import { shallowMount } from '@vue/test-utils';
import MockAdapter from 'axios-mock-adapter';
import ResetKey from 'ee/prometheus_alerts/components/reset_key.vue';
import { GlModal } from '@gitlab/ui';
......@@ -7,10 +7,8 @@ import ClipboardButton from '~/vue_shared/components/clipboard_button.vue';
import axios from '~/lib/utils/axios_utils';
describe('ResetKey', () => {
let Component;
let mock;
let vm;
const localVue = createLocalVue();
const propsData = {
initialAuthorizationKey: 'abcd1234',
......@@ -21,7 +19,6 @@ describe('ResetKey', () => {
beforeEach(() => {
mock = new MockAdapter(axios);
Component = localVue.extend(ResetKey);
setFixtures('<div class="flash-container"></div><div id="reset-key"></div>');
});
......@@ -33,7 +30,7 @@ describe('ResetKey', () => {
describe('authorization key exists', () => {
beforeEach(() => {
propsData.initialAuthorizationKey = 'abcd1234';
vm = shallowMount(Component, {
vm = shallowMount(ResetKey, {
propsData,
});
});
......@@ -85,7 +82,7 @@ describe('ResetKey', () => {
describe('authorization key has not been set', () => {
beforeEach(() => {
propsData.initialAuthorizationKey = '';
vm = shallowMount(Component, {
vm = shallowMount(ResetKey, {
propsData,
});
});
......
......@@ -6,7 +6,7 @@ describe('Progress Bar', () => {
let wrapper;
const factory = propsData => {
wrapper = shallowMount(localVue.extend(component), {
wrapper = shallowMount(component, {
propsData,
localVue,
sync: false,
......
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