Browse Source

fix attribute interpolation tests in IE10/11

Evan You 10 năm trước cách đây
mục cha
commit
c6855009cb
1 tập tin đã thay đổi với 4 bổ sung2 xóa
  1. 4 2
      test/unit/specs/compiler/compile_spec.js

+ 4 - 2
test/unit/specs/compiler/compile_spec.js

@@ -478,11 +478,13 @@ if (_.inBrowser) {
           c: 'ccc'
         }
       })
-      expect(el.innerHTML).toBe('<div id="aaa" class="b ccc d"></div>')
+      expect(el.firstChild.id).toBe('aaa')
+      expect(el.firstChild.className).toBe('b ccc d')
       vm.a = 'aa'
       vm.c = 'cc'
       _.nextTick(function () {
-        expect(el.innerHTML).toBe('<div id="aa" class="b cc d"></div>')
+        expect(el.firstChild.id).toBe('aa')
+        expect(el.firstChild.className).toBe('b cc d')
         done()
       })
     })