Browse Source

test:improve reserved props test

dev
gebilaoxiong 8 years ago
committed by Evan You
parent
commit
2f628c3114
  1. 9
      test/unit/features/options/props.spec.js

9
test/unit/features/options/props.spec.js

@ -490,11 +490,12 @@ describe('Options props', () => {
})
it('warn reserved props', () => {
const specialAttrs = ['key', 'ref', 'slot', 'is']
new Vue({
props: {
key: String
}
props: specialAttrs
})
specialAttrs.forEach(attr => {
expect(`"${attr}" is a reserved attribute`).toHaveBeenWarned()
})
expect(`"key" is a reserved attribute`).toHaveBeenWarned()
})
})

Loading…
Cancel
Save