import Vue from 'vue' describe('Directive v-pre', function () { it('should not compile inner content', function () { const vm = new Vue({ template: `
{{ a }}
{{ a }}
`, data: { a: 123 } }) vm.$mount() expect(vm.$el.firstChild.textContent).toBe('{{ a }}') expect(vm.$el.children[1].textContent).toBe('123') expect(vm.$el.lastChild.innerHTML).toBe('') }) it('should not compile on root node', function () { const vm = new Vue({ template: '
{{ a }}
', replace: true, data: { a: 123 } }) vm.$mount() expect(vm.$el.firstChild.textContent).toBe('{{ a }}') }) // #8286 it('should not compile custom component tags', function () { Vue.component('vtest', { template: `
Hello World
` }) const vm = new Vue({ template: '
', replace: true }) vm.$mount() expect(vm.$el.firstChild.tagName).toBe('VTEST') }) // #10087 it('should not compile attributes', function () { const vm = new Vue({ template: '

A Test

' }) vm.$mount() expect(vm.$el.firstChild.getAttribute('open')).toBe('hello') }) })