Kaynağa Gözat

test for v-cloak

Evan You 10 yıl önce
ebeveyn
işleme
34b37a62ec
1 değiştirilmiş dosya ile 10 ekleme ve 0 silme
  1. 10 0
      test/unit/features/directives/cloak.spec.js

+ 10 - 0
test/unit/features/directives/cloak.spec.js

@@ -0,0 +1,10 @@
+import Vue from 'vue'
+
+describe('Directive v-cloak', () => {
+  it('should be removed after compile', () => {
+    const el = document.createElement('div')
+    el.setAttribute('v-cloak', '')
+    const vm = new Vue({ el })
+    expect(vm.$el.hasAttribute('v-cloak')).toBe(false)
+  })
+})