model-dynamic.spec.js 348 B

1234567891011121314
  1. import Vue from 'vue'
  2. describe('Directive v-model dynamic input type', () => {
  3. it('should warn', function () {
  4. new Vue({
  5. data: {
  6. type: 'text',
  7. text: 'hi'
  8. },
  9. template: `<input :type="type" v-model="text">`
  10. }).$mount()
  11. expect(`v-model does not support dynamic input types`).toHaveBeenWarned()
  12. })
  13. })