@vue/test-utils#createLocalVue JavaScript Examples

The following examples show how to use @vue/test-utils#createLocalVue. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: d2-icon-select.spec.js    From qatrade_admin with MIT License 6 votes vote down vote up
describe('d2-icon-select', () => {
  const localVue = createLocalVue()
  localVue.use(ElementUI)

  // 存在且是Vue组件实例
  it('is a vue instance', () => {
    const wrapper = mount(D2IconSelect, {
      stubs: ['el-popover', 'el-button', 'el-input', 'el-collapse', 'el-collapse-item', 'el-col', 'el-row']
    })

    expect(wrapper.exists()).toBeTruthy()
    expect(wrapper.isVueInstance()).toBeTruthy()
  })

  // // props
  // it('has props', () => {
  //   const wrapper = mount(D2IconSelect, {
  //     propsData: {
  //       value: 'value',
  //       placeholder: '请选择',
  //       placement: 'right',
  //       clearable: true,
  //       userInput: false,
  //       autoClose: false
  //     }
  //   })

  //   expect(wrapper.props().value).toEqual('value')
  //   expect(wrapper.props().placeholder).toEqual('请选择')
  //   expect(wrapper.props().placement).toEqual('right')
  //   expect(wrapper.props().clearable).toEqual(true)
  //   expect(wrapper.props().userInput).toEqual(false)
  //   expect(wrapper.props().autoClose).toEqual(false)
  // })
})
Example #2
Source File: SelectInput.test.js    From pollen with MIT License 5 votes vote down vote up
localVue = createLocalVue()
Example #3
Source File: matter-card.spec.js    From kanban-app with MIT License 5 votes vote down vote up
localVue = createLocalVue()
Example #4
Source File: Breadcrumb.spec.js    From SystemManagement with MIT License 5 votes vote down vote up
localVue = createLocalVue()
Example #5
Source File: messages.spec.js    From Front-End-Development-Projects-with-Vue.js with MIT License 5 votes vote down vote up
localVue = createLocalVue()
Example #6
Source File: FormList.spec.js    From common-forms-toolkit with Apache License 2.0 5 votes vote down vote up
localVue = createLocalVue()
Example #7
Source File: AddOwner.spec.js    From common-hosted-form-service with Apache License 2.0 5 votes vote down vote up
localVue = createLocalVue()