Skip to content

Commit bd7ff4e

Browse files
committed
test: warn directives on fragment instance
1 parent 3ff16df commit bd7ff4e

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

test/unit/specs/compiler/compile_spec.js

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -514,5 +514,19 @@ if (_.inBrowser) {
514514
expect(hasWarned(_, 'attribute interpolation is allowed only in valid native attributes')).toBe(true)
515515
})
516516

517+
it('warn directives on fragment instances', function () {
518+
new Vue({
519+
el: el,
520+
template: '<test v-show="ok"></test>',
521+
components: {
522+
test: {
523+
replace: true,
524+
template: '123'
525+
}
526+
}
527+
})
528+
expect(hasWarned(_, 'v-show is ignored on component <test>')).toBe(true)
529+
})
530+
517531
})
518532
}

0 commit comments

Comments
 (0)