Commit e161c7ca authored by Illya Klymov's avatar Illya Klymov

Remove incorrect localVue usage

localVue is required only with use method
parent 4372a6c9
......@@ -33,7 +33,7 @@ describe('GlModalVuex', () => {
...options.propsData,
};
wrapper = shallowMount(localVue.extend(GlModalVuex), {
wrapper = shallowMount(GlModalVuex, {
...options,
localVue,
store,
......@@ -123,8 +123,8 @@ describe('GlModalVuex', () => {
state.isVisible = true;
localVue
.nextTick()
wrapper.vm
.$nextTick()
.then(() => {
expect(rootEmit).toHaveBeenCalledWith('bv::show::modal', TEST_MODAL_ID);
})
......@@ -140,8 +140,8 @@ describe('GlModalVuex', () => {
state.isVisible = false;
localVue
.nextTick()
wrapper.vm
.$nextTick()
.then(() => {
expect(rootEmit).toHaveBeenCalledWith('bv::hide::modal', TEST_MODAL_ID);
})
......
import { mount, createLocalVue } from '@vue/test-utils';
import { mount } from '@vue/test-utils';
import fieldComponent from '~/vue_shared/components/markdown/field.vue';
import { TEST_HOST, FIXTURES_PATH } from 'spec/test_constants';
import AxiosMockAdapter from 'axios-mock-adapter';
......@@ -50,7 +50,6 @@ const getVideo = wrapper => wrapper.find('video');
describe('Markdown field component', () => {
let axiosMock;
const localVue = createLocalVue();
beforeEach(() => {
axiosMock = new AxiosMockAdapter(axios);
......@@ -84,7 +83,7 @@ describe('Markdown field component', () => {
previewLink = getPreviewLink(wrapper);
previewLink.trigger('click');
return localVue.nextTick().then(() => {
return wrapper.vm.$nextTick().then(() => {
expect(previewLink.element.parentNode.classList.contains('active')).toBeTruthy();
});
});
......@@ -94,7 +93,7 @@ describe('Markdown field component', () => {
previewLink = getPreviewLink(wrapper);
previewLink.trigger('click');
localVue.nextTick(() => {
wrapper.vm.$nextTick(() => {
expect(wrapper.find('.md-preview-holder').element.textContent.trim()).toContain(
'Loading…',
);
......@@ -155,17 +154,17 @@ describe('Markdown field component', () => {
previewLink = getPreviewLink(wrapper);
writeLink.trigger('click');
return localVue
.nextTick()
return wrapper.vm
.$nextTick()
.then(() => assertMarkdownTabs(true, writeLink, previewLink, wrapper))
.then(() => writeLink.trigger('click'))
.then(() => localVue.nextTick())
.then(() => wrapper.vm.$nextTick())
.then(() => assertMarkdownTabs(true, writeLink, previewLink, wrapper))
.then(() => previewLink.trigger('click'))
.then(() => localVue.nextTick())
.then(() => wrapper.vm.$nextTick())
.then(() => assertMarkdownTabs(false, writeLink, previewLink, wrapper))
.then(() => previewLink.trigger('click'))
.then(() => localVue.nextTick())
.then(() => wrapper.vm.$nextTick())
.then(() => assertMarkdownTabs(false, writeLink, previewLink, wrapper));
});
});
......@@ -178,7 +177,7 @@ describe('Markdown field component', () => {
const markdownButton = getMarkdownButton(wrapper);
markdownButton.trigger('click');
localVue.nextTick(() => {
wrapper.vm.$nextTick(() => {
expect(textarea.value).toContain('**testing**');
});
});
......@@ -190,7 +189,7 @@ describe('Markdown field component', () => {
const markdownButton = getAllMarkdownButtons(wrapper).wrappers[5];
markdownButton.trigger('click');
localVue.nextTick(() => {
wrapper.vm.$nextTick(() => {
expect(textarea.value).toContain('* testing');
});
});
......@@ -202,7 +201,7 @@ describe('Markdown field component', () => {
const markdownButton = getAllMarkdownButtons(wrapper).wrappers[5];
markdownButton.trigger('click');
localVue.nextTick(() => {
wrapper.vm.$nextTick(() => {
expect(textarea.value).toContain('* testing\n* 123');
});
});
......
import { shallowMount, createLocalVue } from '@vue/test-utils';
import { shallowMount } from '@vue/test-utils';
import SuggestionDiffRow from '~/vue_shared/components/markdown/suggestion_diff_row.vue';
const oldLine = {
......@@ -27,10 +27,7 @@ describe('SuggestionDiffRow', () => {
let wrapper;
const factory = (options = {}) => {
const localVue = createLocalVue();
wrapper = shallowMount(SuggestionDiffRow, {
localVue,
...options,
});
};
......
import { shallowMount, createLocalVue } from '@vue/test-utils';
import { shallowMount } from '@vue/test-utils';
import { GlButton } from '@gitlab/ui';
import { TEST_HOST } from 'spec/test_constants';
import UserAvatarList from '~/vue_shared/components/user_avatar/user_avatar_list.vue';
......@@ -20,8 +20,6 @@ const createList = n =>
.fill(1)
.map((x, id) => createUser(id));
const localVue = createLocalVue();
describe('UserAvatarList', () => {
let props;
let wrapper;
......@@ -32,9 +30,8 @@ describe('UserAvatarList', () => {
...options.propsData,
};
wrapper = shallowMount(localVue.extend(UserAvatarList), {
wrapper = shallowMount(UserAvatarList, {
...options,
localVue,
propsData,
});
};
......
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