parent
a471c1c7cf
commit
d6a3208c06
@ -1,14 +0,0 @@
|
||||
import Vue from 'vue'
|
||||
import Button from '../index'
|
||||
|
||||
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)
|
||||
})
|
||||
})
|
@ -0,0 +1,18 @@
|
||||
import Button from '../index'
|
||||
import {mount} from 'avoriaz'
|
||||
|
||||
describe('Button', () => {
|
||||
let wrapper
|
||||
|
||||
afterEach(() => {
|
||||
wrapper && wrapper.destroy()
|
||||
})
|
||||
it('create primary button', () => {
|
||||
wrapper = mount(Button, {
|
||||
propsData: {
|
||||
type: 'primary',
|
||||
},
|
||||
})
|
||||
expect(wrapper.hasClass('ant-btn-primary')).to.equal(true)
|
||||
})
|
||||
})
|
File diff suppressed because it is too large
Load Diff
@ -1,14 +0,0 @@
|
||||
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)
|
||||
})
|
||||
})
|
Loading…
Reference in new issue