Commit 94bdec9f authored by Kushal Pandya's avatar Kushal Pandya

Merge branch 'winh-small-jestodus' into 'master'

Move some tests from Karma to Jest

Closes gitlab-ee#10613 and gitlab-ee#10592

See merge request gitlab-org/gitlab-ce!26511
parents 87d36bc2 514ee638
import Vue from 'vue';
const mountComponent = (Component, props = {}, el = null) =>
new Component({
propsData: props,
}).$mount(el);
export const createComponentWithStore = (Component, store, propsData = {}) =>
new Component({
store,
propsData,
});
export const mountComponentWithStore = (Component, { el, props, store }) =>
new Component({
store,
propsData: props || {},
}).$mount(el);
export const mountComponentWithSlots = (Component, { props, slots }) => {
const component = new Component({
propsData: props || {},
});
component.$slots = slots;
return component.$mount();
};
/**
* Mount a component with the given render method.
*
* This helps with inserting slots that need to be compiled.
*/
export const mountComponentWithRender = (render, el = null) =>
mountComponent(Vue.extend({ render }), {}, el);
export default mountComponent;
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