8000 add test for custom terminal directive · GouTao/vue@f5a63b4 · GitHub
[go: up one dir, main page]

Skip to conte 8000 nt

Commit f5a63b4

Browse files
committed
add test for custom terminal directive
1 parent aa29ae4 commit f5a63b4

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

test/unit/specs/compiler/compile_spec.js

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -634,4 +634,17 @@ describe('Compile', function () {
634634
expect(el.textContent).toBe('worked!')
635635
expect(getWarnCount()).toBe(0)
636636
})
637+
638+
it('allow custom terminal directive', function () {
639+
Vue.mixin({})
640+
Vue.compiler.terminalDirectives.push('foo')
641+
Vue.directive('foo', {})
642+
643+
new Vue({
644+
el: el,
645+
template: '<div v-foo></div>'
646+
})
647+
648+
expect(getWarnCount()).toBe(0)
649+
})
637650
})

0 commit comments

Comments
 (0)
0