diff options
author | Lukas Eipert <leipert@gitlab.com> | 2018-05-28 11:48:22 +0200 |
---|---|---|
committer | Lukas Eipert <leipert@gitlab.com> | 2018-05-29 18:42:29 +0200 |
commit | 9a9f758d9121bcf24fa3fcee6dc724030467a6f3 (patch) | |
tree | 8f04b4d2aa799d8523f92179675faf3ae14ee7bd /spec | |
parent | 99c4e46d1df36ed7830dfaef2e146177752f244f (diff) | |
download | gitlab-ce-9a9f758d9121bcf24fa3fcee6dc724030467a6f3.tar.gz |
remove unused createComponentWithMixin from vue spec helpers
Diffstat (limited to 'spec')
-rw-r--r-- | spec/javascripts/helpers/vue_mount_component_helper.js | 30 |
1 files changed, 9 insertions, 21 deletions
diff --git a/spec/javascripts/helpers/vue_mount_component_helper.js b/spec/javascripts/helpers/vue_mount_component_helper.js index a34a1add4e0..5ba17ecf5b5 100644 --- a/spec/javascripts/helpers/vue_mount_component_helper.js +++ b/spec/javascripts/helpers/vue_mount_component_helper.js @@ -1,30 +1,18 @@ -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, -}); +const mountComponent = (Component, props = {}, el = null) => + new Component({ + propsData: props, + }).$mount(el); -export const createComponentWithMixin = (mixins = [], state = {}, props = {}, template = '<div></div>') => { - const Component = Vue.extend({ - template, - mixins, - data() { - return props; - }, +export const createComponentWithStore = (Component, store, propsData = {}) => + new Component({ + store, + propsData, }); - return mountComponent(Component, props); -}; - export const mountComponentWithStore = (Component, { el, props, store }) => new Component({ store, - propsData: props || { }, + propsData: props || {}, }).$mount(el); export default mountComponent; |