We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 81911b4 commit eb49441Copy full SHA for eb49441
test/unit/specs/directives/prop_spec.js
@@ -356,5 +356,33 @@ if (_.inBrowser) {
356
})
357
358
359
+
360
+ it('alternative syntax', function () {
361
+ var vm = new Vue({
362
+ el: el,
363
+ template: '<test b="{{a}}" c="{{d}}"></test>',
364
+ data: {
365
+ a: 'AAA',
366
+ d: 'DDD'
367
+ },
368
+ components: {
369
+ test: {
370
+ props: {
371
+ b: String,
372
+ c: {
373
+ type: Number
374
375
+ d: {
376
+ required: true
377
+ }
378
379
+ template: '<p>{{b}}</p><p>{{c}}</p>'
380
381
382
+ })
383
+ expect(hasWarned(_, 'Missing required prop')).toBe(true)
384
+ expect(hasWarned(_, 'Expected Number')).toBe(true)
385
+ expect(el.textContent).toBe('AAA')
386
387
388
}
0 commit comments