2
0

comments.spec.js 407 B

12345678910111213141516
  1. import Vue from 'vue'
  2. describe('Comments', () => {
  3. it('comments should be kept', () => {
  4. const vm = new Vue({
  5. comments: true,
  6. data () {
  7. return {
  8. foo: 1
  9. }
  10. },
  11. template: '<div><span>node1</span><!--comment1-->{{foo}}<!--comment2--></div>'
  12. }).$mount()
  13. expect(vm.$el.innerHTML).toEqual('<span>node1</span><!--comment1-->1<!--comment2-->')
  14. })
  15. })