You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
ant-design-vue/test/specs/Button.spec.js

15 lines
442 B

import Vue from 'vue'
import Button from '../../components/button'
describe('Button.vue', () => {
it('should render correct contents', () => {
const Constructor = Vue.extend(Button)
const ele = document.createElement('div')
document.body.appendChild(ele)
const vm = new Constructor({ propsData: { type: 'primary' }})
vm.$mount(ele)
expect(vm.$el.classList.contains('ant-btn-primary'))
.to.equal(true)
})
})