@@ -217,8 +217,7 @@ describe('UNIT: ViewModel', function () {
217217
218218 var enterCalled ,
219219 leaveCalled ,
220- callbackCalled ,
221- nextTick = require ( 'vue/src/utils' ) . nextTick
220+ callbackCalled
222221
223222 var v = new Vue ( {
224223 attributes : {
@@ -254,10 +253,10 @@ describe('UNIT: ViewModel', function () {
254253 v . $appendTo ( parent , cb )
255254 assert . strictEqual ( v . $el . parentNode , parent )
256255 assert . ok ( enterCalled )
257- nextTick ( function ( ) {
256+ setTimeout ( function ( ) {
258257 assert . ok ( callbackCalled )
259258 done ( )
260- } )
259+ } , 0 )
261260 } )
262261
263262 it ( '$before' , function ( done ) {
@@ -269,10 +268,10 @@ describe('UNIT: ViewModel', function () {
269268 assert . strictEqual ( v . $el . parentNode , parent )
270269 assert . strictEqual ( v . $el . nextSibling , ref )
271270 assert . ok ( enterCalled )
272- nextTick ( function ( ) {
271+ setTimeout ( function ( ) {
273272 assert . ok ( callbackCalled )
274273 done ( )
275- } )
274+ } , 0 )
276275 } )
277276
278277 it ( '$after' , function ( done ) {
@@ -287,10 +286,10 @@ describe('UNIT: ViewModel', function () {
287286 assert . strictEqual ( v . $el . nextSibling , ref2 )
288287 assert . strictEqual ( ref1 . nextSibling , v . $el )
289288 assert . ok ( enterCalled )
290- nextTick ( function ( ) {
289+ setTimeout ( function ( ) {
291290 assert . ok ( callbackCalled )
292291 next ( )
293- } )
292+ } , 0 )
294293
295294 function next ( ) {
296295 reset ( )
@@ -299,10 +298,10 @@ describe('UNIT: ViewModel', function () {
299298 assert . notOk ( v . $el . nextSibling )
300299 assert . strictEqual ( ref2 . nextSibling , v . $el )
301300 assert . ok ( enterCalled )
302- nextTick ( function ( ) {
301+ setTimeout ( function ( ) {
303302 assert . ok ( callbackCalled )
304303 done ( )
305- } )
304+ } , 0 )
306305 }
307306 } )
308307
@@ -314,7 +313,7 @@ describe('UNIT: ViewModel', function () {
314313 assert . notOk ( v . $el . parentNode )
315314 assert . ok ( enterCalled )
316315 assert . ok ( leaveCalled )
317- nextTick ( function ( ) {
316+ setTimeout ( function ( ) {
318317 assert . ok ( callbackCalled )
319318 done ( )
320319 } )
0 commit comments