Skip to content

Commit 8e17125

Browse files
committed
add tests
1 parent deff257 commit 8e17125

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

test/specs/vue-numeric.spec.js

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,17 @@ describe('vue-numeric.vue', () => {
7171
})
7272
})
7373

74+
it('does not apply class when read-only mode disabled', done => {
75+
const propsData = { value: 3000, readOnly: true, readOnlyClass: 'testclass' }
76+
const wrapper = mount(VueNumeric, { propsData })
77+
78+
wrapper.setProps({ readOnly: false })
79+
wrapper.instance().$nextTick(() => {
80+
expect(wrapper.instance().$el.className).to.equal('')
81+
done()
82+
})
83+
})
84+
7485
it('cannot exceed max props', () => {
7586
const component = Vue.extend({
7687
data: () => ({ total: 150 }),

0 commit comments

Comments
 (0)