Pārlūkot izejas kodu

fix style merging assertion in IE

Evan You 9 gadi atpakaļ
vecāks
revīzija
438b51793f
1 mainītis faili ar 6 papildinājumiem un 1 dzēšanām
  1. 6 1
      test/unit/features/directives/style.spec.js

+ 6 - 1
test/unit/features/directives/style.spec.js

@@ -195,7 +195,12 @@ describe('Directive v-bind:style', () => {
     }).$mount()
     const style = vm.$el.style
     const child = vm.$children[0]
-    expect(style.cssText.replace(/\s/g, '')).toBe('margin-right:20px;margin-left:16px;text-align:left;color:red;font-size:12px;')
+    const css = style.cssText.replace(/\s/g, '')
+    expect(css).toContain('margin-right:20px;')
+    expect(css).toContain('margin-left:16px;')
+    expect(css).toContain('text-align:left;')
+    expect(css).toContain('color:red;')
+    expect(css).toContain('font-size:12px;')
     expect(style.color).toBe('red')
     expect(style.marginRight).toBe('20px')
     vm.test.color = 'blue'