Skip to content

Commit c4da6c7

Browse files
committed
fix select multiple warning test case in IE
1 parent abb966b commit c4da6c7

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

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

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -334,15 +334,19 @@ describe('Directive v-model select', () => {
334334
.toHaveBeenWarned()
335335
})
336336

337-
it('should warn multiple with non-Array value', () => {
337+
it('should warn multiple with non-Array value', done => {
338338
new Vue({
339339
data: {
340340
test: 'meh'
341341
},
342342
template:
343343
'<select v-model="test" multiple></select>'
344344
}).$mount()
345-
expect('<select multiple v-model="test"> expects an Array value for its binding, but got String')
346-
.toHaveBeenWarned()
345+
// IE warns on a setTimeout as well
346+
setTimeout(() => {
347+
expect('<select multiple v-model="test"> expects an Array value for its binding, but got String')
348+
.toHaveBeenWarned()
349+
done()
350+
}, 0)
347351
})
348352
})

0 commit comments

Comments
 (0)