소스 검색

make the test a bit more fault tolerent on sauce

Evan You 10 년 전
부모
커밋
e56778a6d1
1개의 변경된 파일11개의 추가작업 그리고 11개의 파일을 삭제
  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)
   })