Skip to content

Commit 7010d0f

Browse files
S-YOUyyx990803
authored andcommitted
chore(model-select.spec): add a check for value binding and fix some typo (vuejs#5092)
* chore: add a check for value binding * chore: fix some typo
1 parent 8acfdb3 commit 7010d0f

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

test/unit/features/directives/model-select.spec.js

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -80,9 +80,14 @@ describe('Directive v-model select', () => {
8080
waitForUpdate(function () {
8181
expect(vm.$el.value).toBe('3')
8282
expect(vm.$el.childNodes[2].selected).toBe(true)
83+
8384
updateSelect(vm.$el, '1')
8485
triggerEvent(vm.$el, 'change')
8586
expect(vm.test).toBe('1')
87+
88+
updateSelect(vm.$el, '2')
89+
triggerEvent(vm.$el, 'change')
90+
expect(vm.test).toBe(2)
8691
}).then(done)
8792
})
8893

@@ -152,7 +157,7 @@ describe('Directive v-model select', () => {
152157
},
153158
template:
154159
'<select v-model="test">' +
155-
'<option v-for="o in opts" :value="o">optio {{ o }}</option>' +
160+
'<option v-for="o in opts" :value="o">option {{ o }}</option>' +
156161
'</select>'
157162
}).$mount()
158163
document.body.appendChild(vm.$el)
@@ -374,7 +379,7 @@ describe('Directive v-model select', () => {
374379
expect(vm.test).toBe(1)
375380
})
376381

377-
it('should respect different pritive type value', (done) => {
382+
it('should respect different primitive type value', (done) => {
378383
const vm = new Vue({
379384
data: {
380385
test: 0

0 commit comments

Comments
 (0)