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 0288b5b commit 74c2005Copy full SHA for 74c2005
test/unit/features/component/component.spec.js
@@ -426,4 +426,18 @@ describe('Component', () => {
426
vm.$destroy()
427
}).then(done)
428
})
429
+
430
+ it('render vnode with <script> tag as root element', () => {
431
+ const vm = new Vue({
432
+ template: '<scriptTest></scriptTest>',
433
+ components: {
434
+ scriptTest: {
435
+ template: '<script>console.log(1)</script>'
436
+ }
437
438
+ }).$mount()
439
+ expect(vm.$el.tagName).toBe('SCRIPT')
440
+ expect(vm.$el.innerHTML).toBe('')
441
+ expect('Templates should only be responsible for mapping the state').toHaveBeenWarned()
442
+ })
443
0 commit comments