Skip to content

Commit 389212e

Browse files
mo3rfanmorloderex
authored andcommitted
Add test for separator prop watcher
1 parent 6aeba2d commit 389212e

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

test/specs/vue-numeric.spec.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -206,4 +206,10 @@ describe('vue-numeric.vue', () => {
206206
const wrapper = mount(component)
207207
expect(wrapper.data().total).to.equal(0)
208208
})
209+
210+
it('apply new separator immediately if it is changed', () => {
211+
const wrapper = mount(VueNumeric, { propsData: { value: 2000, separator: "," } })
212+
wrapper.setProps({ separator: "." })
213+
expect(wrapper.data().amount).to.equal("2.000")
214+
})
209215
})

0 commit comments

Comments
 (0)