Commit f2c23ab8 authored by Eric Eastwood's avatar Eric Eastwood

Use new shared Vue mountComponent method

parent 5fd3ec1c
import Vue from 'vue';
import conflictsComponent from '~/vue_merge_request_widget/components/states/mr_widget_conflicts';
import mountComponent from '../../../helpers/vue_mount_component_helper';
const ConflictsComponent = Vue.extend(conflictsComponent);
const path = '/conflicts';
const createComponent = (customConfig = {}) => {
const Component = Vue.extend(conflictsComponent);
const config = Object.assign({
mr: {},
}, customConfig);
return new Component({
el: document.createElement('div'),
propsData: config,
});
};
describe('MRWidgetConflicts', () => {
describe('props', () => {
......@@ -30,7 +20,7 @@ describe('MRWidgetConflicts', () => {
let vm;
beforeEach(() => {
vm = createComponent({
vm = mountComponent(ConflictsComponent, {
mr: {
canMerge: true,
conflictResolutionPath: path,
......@@ -65,7 +55,7 @@ describe('MRWidgetConflicts', () => {
let vm;
beforeEach(() => {
vm = createComponent({
vm = mountComponent(ConflictsComponent, {
mr: {
canMerge: false,
},
......@@ -87,7 +77,7 @@ describe('MRWidgetConflicts', () => {
let vm;
beforeEach(() => {
vm = createComponent({
vm = mountComponent(ConflictsComponent, {
mr: {
ffOnlyEnabled: true,
},
......
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