Skip to content

Commit 8ca55b4

Browse files
committed
fix unit test
1 parent 4c50a1d commit 8ca55b4

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

src/vue-numeric.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -274,7 +274,7 @@ export default {
274274
},
275275
276276
mounted () {
277-
// Set default value props when valueNumber has some value
277+
// Set default value props when valueNumber has some value
278278
if (this.valueNumber) {
279279
this.process(this.valueNumber)
280280
this.amount = this.format(this.valueNumber)

test/specs/vue-numeric.spec.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -241,14 +241,14 @@ describe('vue-numeric.vue', () => {
241241
expect(process.called).to.equal(true)
242242
})
243243

244-
it('does not show default value when placeholder if defined', () => {
244+
it('does not show placeholder when value defined', () => {
245245
const wrapper = mount(VueNumeric, { propsData: { value: 2000, placeholder: 'number here' }})
246-
expect(wrapper.data().amount).to.equal('')
246+
expect(wrapper.data().amount).to.equal('2,000')
247247
})
248248

249-
it('sets the value to 0 when no empty value is provided and input is empty', () => {
249+
it('does not sets the value to 0 when no empty value is provided and input is empty', () => {
250250
const wrapper = mount(VueNumeric, { propsData: { value: '' }})
251-
expect(wrapper.data().amount).to.equal('0')
251+
expect(wrapper.data().amount).to.equal('')
252252
})
253253

254254
it('uses the provided empty value when input is empty', () => {

0 commit comments

Comments
 (0)