Commit 9ad2fbd2 authored by Illya Klymov's avatar Illya Klymov

Remove incorrect localVue usage

localVue is required only with use method
parent 4372a6c9
import { shallowMount, createLocalVue } from '@vue/test-utils';
import { shallowMount } from '@vue/test-utils';
import { GlLink, GlBadge } from '@gitlab/ui';
import component from 'ee/environments_dashboard/components/dashboard/environment_header.vue';
import Icon from '~/vue_shared/components/icon.vue';
import ReviewAppLink from '~/vue_merge_request_widget/components/review_app_link.vue';
const localVue = createLocalVue();
describe('Environment Header', () => {
const Component = localVue.extend(component);
let wrapper;
let propsData;
......@@ -27,11 +24,10 @@ describe('Environment Header', () => {
describe('renders name and link to app', () => {
beforeEach(() => {
wrapper = shallowMount(Component, {
wrapper = shallowMount(component, {
sync: false,
attachToDocument: true,
propsData,
localVue,
});
});
......@@ -64,11 +60,10 @@ describe('Environment Header', () => {
propsData.environment.within_folder = true;
propsData.environment.name = 'review/testing';
wrapper = shallowMount(Component, {
wrapper = shallowMount(component, {
sync: false,
attachToDocument: true,
propsData,
localVue,
});
});
......@@ -91,11 +86,10 @@ describe('Environment Header', () => {
beforeEach(() => {
propsData.hasErrors = true;
wrapper = shallowMount(Component, {
wrapper = shallowMount(component, {
sync: false,
attachToDocument: true,
propsData,
localVue,
});
});
......@@ -108,11 +102,10 @@ describe('Environment Header', () => {
beforeEach(() => {
propsData.hasPipelineFailed = true;
wrapper = shallowMount(Component, {
wrapper = shallowMount(component, {
sync: false,
attachToDocument: true,
propsData,
localVue,
});
});
......
import { shallowMount, createLocalVue } from '@vue/test-utils';
import { shallowMount } from '@vue/test-utils';
import component from 'ee/environments_dashboard/components/dashboard/environment.vue';
import EnvironmentHeader from 'ee/environments_dashboard/components/dashboard/environment_header.vue';
import Alert from 'ee/vue_shared/dashboards/components/alerts.vue';
import Commit from '~/vue_shared/components/commit.vue';
import environment from './mock_environment.json';
const localVue = createLocalVue();
describe('Environment', () => {
const Component = localVue.extend(component);
let wrapper;
let propsData;
......@@ -16,10 +13,9 @@ describe('Environment', () => {
propsData = {
environment,
};
wrapper = shallowMount(Component, {
wrapper = shallowMount(component, {
sync: false,
attachToDocument: true,
localVue,
propsData,
});
});
......@@ -95,10 +91,9 @@ describe('Environment', () => {
last_deployment: null,
},
};
wrapper = shallowMount(Component, {
wrapper = shallowMount(component, {
sync: false,
attachToDocument: true,
localVue,
propsData,
});
......@@ -115,10 +110,9 @@ describe('Environment', () => {
},
},
};
wrapper = shallowMount(Component, {
wrapper = shallowMount(component, {
sync: false,
attachToDocument: true,
localVue,
propsData,
});
......
import { shallowMount, createLocalVue } from '@vue/test-utils';
import { shallowMount } from '@vue/test-utils';
import { GlButton } from '@gitlab/ui';
import component from 'ee/environments_dashboard/components/dashboard/project_header.vue';
import ProjectAvatar from '~/vue_shared/components/project_avatar/default.vue';
const localVue = createLocalVue();
describe('Project Header', () => {
const Component = localVue.extend(component);
let wrapper;
let propsData;
......@@ -24,11 +21,10 @@ describe('Project Header', () => {
});
beforeEach(() => {
wrapper = shallowMount(Component, {
wrapper = shallowMount(component, {
sync: false,
attachToDocument: true,
propsData,
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