ibps-icon-svg.spec.js 587 B

123456789101112131415161718192021222324252627
  1. import { mount } from '@vue/test-utils'
  2. import IbpsIconSvg from '@/components/ibps-icon-svg/index.vue'
  3. describe('ibps-icon-svg', () => {
  4. // 存在且是Vue组件实例
  5. it('is a vue instance', () => {
  6. const wrapper = mount(IbpsIconSvg, {
  7. propsData: {
  8. name: 'add'
  9. }
  10. })
  11. expect(wrapper.exists()).toBeTruthy()
  12. expect(wrapper.isVueInstance()).toBeTruthy()
  13. })
  14. // props
  15. it('has props', () => {
  16. const wrapper = mount(IbpsIconSvg, {
  17. propsData: {
  18. name: 'add'
  19. }
  20. })
  21. expect(wrapper.props().name).toEqual('add')
  22. })
  23. })