Commit dd7e95ea authored by Illya Klymov's avatar Illya Klymov

Remove incorrect localVue usage

localVue is required only with use method
parent cbe5d88b
import { createLocalVue, shallowMount } from '@vue/test-utils';
import { shallowMount } from '@vue/test-utils';
import { GlDropdownItem } from '@gitlab/ui';
import { TEST_HOST } from 'helpers/test_constants';
import createStore from 'ee/dependencies/store';
......@@ -12,14 +12,11 @@ describe('DependenciesActions component', () => {
const { namespace } = DEPENDENCY_LIST_TYPES.all;
const factory = ({ propsData, ...options } = {}) => {
const localVue = createLocalVue();
store = createStore();
jest.spyOn(store, 'dispatch').mockImplementation();
wrapper = shallowMount(DependenciesActions, {
...options,
localVue,
store,
sync: false,
attachToDocument: true,
......
import { createLocalVue, shallowMount } from '@vue/test-utils';
import { shallowMount } from '@vue/test-utils';
import DependenciesTableRow from 'ee/dependencies/components/dependencies_table_row.vue';
import DependencyVulnerability from 'ee/dependencies/components/dependency_vulnerability.vue';
import { MAX_DISPLAYED_VULNERABILITIES_PER_DEPENDENCY } from 'ee/dependencies/components/constants';
......@@ -9,11 +9,8 @@ describe('DependenciesTableRow component', () => {
let wrapper;
const factory = ({ propsData, ...options } = {}) => {
const localVue = createLocalVue();
wrapper = shallowMount(DependenciesTableRow, {
...options,
localVue,
sync: false,
propsData: { ...propsData },
});
......
import { createLocalVue, shallowMount } from '@vue/test-utils';
import { shallowMount } from '@vue/test-utils';
import DependenciesTable from 'ee/dependencies/components/dependencies_table.vue';
import DependenciesTableRow from 'ee/dependencies/components/dependencies_table_row.vue';
import { makeDependency } from './utils';
......@@ -7,11 +7,8 @@ describe('DependenciesTable component', () => {
let wrapper;
const factory = ({ propsData, ...options } = {}) => {
const localVue = createLocalVue();
wrapper = shallowMount(DependenciesTable, {
...options,
localVue,
sync: false,
propsData: { ...propsData },
});
......
import { createLocalVue, shallowMount } from '@vue/test-utils';
import { shallowMount } from '@vue/test-utils';
import { GlModal, GlLink, GlIntersperse } from '@gitlab/ui';
import DependenciesLicenseLinks from 'ee/dependencies/components/dependency_license_links.vue';
......@@ -17,11 +17,9 @@ describe('DependencyLicenseLinks component', () => {
const factory = ({ numLicenses, numLicensesWithUrl = 0, title = 'test-dependency' } = {}) => {
const licenses = addUrls(createLicenses(numLicenses), numLicensesWithUrl);
const localVue = createLocalVue();
wrapper = shallowMount(DependenciesLicenseLinks, {
sync: false,
attachToDocument: true,
localVue,
propsData: {
licenses,
title,
......
import { createLocalVue, shallowMount } from '@vue/test-utils';
import { shallowMount } from '@vue/test-utils';
import { GlAlert } from '@gitlab/ui';
import DependencyListIncompleteAlert from 'ee/dependencies/components/dependency_list_incomplete_alert.vue';
......@@ -6,10 +6,7 @@ describe('DependencyListIncompleteAlert component', () => {
let wrapper;
const factory = (options = {}) => {
const localVue = createLocalVue();
wrapper = shallowMount(DependencyListIncompleteAlert, {
localVue,
sync: false,
...options,
});
......
import { createLocalVue, shallowMount } from '@vue/test-utils';
import { shallowMount } from '@vue/test-utils';
import { GlAlert } from '@gitlab/ui';
import DependencyListJobFailedAlert from 'ee/dependencies/components/dependency_list_job_failed_alert.vue';
......@@ -11,10 +11,7 @@ describe('DependencyListJobFailedAlert component', () => {
let wrapper;
const factory = (options = {}) => {
const localVue = createLocalVue();
wrapper = shallowMount(DependencyListJobFailedAlert, {
localVue,
sync: false,
...options,
});
......
import { createLocalVue, shallowMount } from '@vue/test-utils';
import { shallowMount } from '@vue/test-utils';
import DependencyVulnerability from 'ee/dependencies/components/dependency_vulnerability.vue';
import SeverityBadge from 'ee/vue_shared/security_reports/components/severity_badge.vue';
import mockDataVulnerabilities from '../../../javascripts/security_dashboard/store/vulnerabilities/data/mock_data_vulnerabilities.json';
......@@ -7,11 +7,8 @@ describe('DependencyVulnerability component', () => {
let wrapper;
const factory = ({ propsData, ...options } = {}) => {
const localVue = createLocalVue();
wrapper = shallowMount(DependencyVulnerability, {
...options,
localVue,
sync: false,
propsData: { ...propsData },
});
......
import { createLocalVue, shallowMount } from '@vue/test-utils';
import { shallowMount } from '@vue/test-utils';
import createStore from 'ee/dependencies/store';
import DependenciesTable from 'ee/dependencies/components/dependencies_table.vue';
import PaginatedDependenciesTable from 'ee/dependencies/components/paginated_dependencies_table.vue';
......@@ -12,12 +12,9 @@ describe('PaginatedDependenciesTable component', () => {
const { namespace } = DEPENDENCY_LIST_TYPES.all;
const factory = (props = {}) => {
const localVue = createLocalVue();
store = createStore();
wrapper = shallowMount(PaginatedDependenciesTable, {
localVue,
store,
sync: false,
propsData: { ...props },
......
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