Przeglądaj źródła

make the test a bit more fault tolerent on sauce

Evan You 10 lat temu
rodzic
commit
e56778a6d1
1 zmienionych plików z 11 dodań i 11 usunięć
  1. 11 11
      test/unit/specs/directives/public/model_spec.js

+ 11 - 11
test/unit/specs/directives/public/model_spec.js

@@ -711,17 +711,17 @@ describe('v-model', function () {
       expect(spy.calls.count()).toBe(1)
       expect(spy).toHaveBeenCalledWith('d', 'a')
       expect(vm.test).toBe('d')
-    }, 150)
-    setTimeout(function () {
-      el.firstChild.value = 'e'
-      // blur should trigger change instantly without debounce
-      trigger(el.firstChild, 'blur')
-      _.nextTick(function () {
-        expect(spy.calls.count()).toBe(2)
-        expect(spy).toHaveBeenCalledWith('e', 'd')
-        expect(vm.test).toBe('e')
-        done()
-      })
+      setTimeout(function () {
+        el.firstChild.value = 'e'
+        // blur should trigger change instantly without debounce
+        trigger(el.firstChild, 'blur')
+        _.nextTick(function () {
+          expect(spy.calls.count()).toBe(2)
+          expect(spy).toHaveBeenCalledWith('e', 'd')
+          expect(vm.test).toBe('e')
+          done()
+        })
+      }, 10)
     }, 200)
   })