vue2/test/unit/features/options/comments.spec.ts

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

20 lines
426 B
TypeScript
Raw Permalink Normal View History

import Vue from 'vue'
describe('Comments', () => {
it('comments should be kept', () => {
const vm = new Vue({
comments: true,
data() {
return {
foo: 1
}
},
template:
'<div><span>node1</span><!--comment1-->{{foo}}<!--comment2--></div>'
}).$mount()
expect(vm.$el.innerHTML).toEqual(
'<span>node1</span><!--comment1-->1<!--comment2-->'
)
})
})