@@ -4,7 +4,8 @@ var _ = Vue.util
44describe ( 'Staggering Transitions' , function ( ) {
55
66 var el
7- var amount = 50
7+ var delayAmount = 50
8+ var multiplier = 2.5 // the bigger the slower, but safer
89 beforeEach ( function ( ) {
910 el = document . createElement ( 'div' )
1011 document . body . appendChild ( el )
@@ -17,7 +18,7 @@ describe('Staggering Transitions', function () {
1718 it ( 'as attribute' , function ( done ) {
1819 var vm = new Vue ( {
1920 el : el ,
20- template : '<div v-repeat="list" v-transition="stagger" stagger="' + amount + '">{{a}}</div>' ,
21+ template : '<div v-repeat="list" v-transition="stagger" stagger="' + delayAmount + '">{{a}}</div>' ,
2122 data : {
2223 list : [ ]
2324 } ,
@@ -45,7 +46,7 @@ describe('Staggering Transitions', function () {
4546 transitions : {
4647 stagger : {
4748 stagger : function ( i ) {
48- return i * amount
49+ return i * delayAmount
4950 } ,
5051 enter : function ( el , done ) {
5152 _ . nextTick ( done )
@@ -62,7 +63,7 @@ describe('Staggering Transitions', function () {
6263 it ( 'remove while staggered' , function ( done ) {
6364 var vm = new Vue ( {
6465 el : el ,
65- template : '<div v-repeat="list" v-transition="stagger" stagger="' + amount + '">{{a}}</div>' ,
66+ template : '<div v-repeat="list" v-transition="stagger" stagger="' + delayAmount + '">{{a}}</div>' ,
6667 data : {
6768 list : [ ]
6869 } ,
@@ -86,14 +87,14 @@ describe('Staggering Transitions', function () {
8687 // should have only one
8788 expect ( el . innerHTML ) . toBe ( '<div class="stagger-transition">1</div>' )
8889 done ( )
89- } , amount * 2 )
90+ } , delayAmount * multiplier )
9091 } )
9192 } )
9293
9394 it ( 'reorder while staggered' , function ( done ) {
9495 var vm = new Vue ( {
9596 el : el ,
96- template : '<div v-repeat="list" v-transition="stagger" stagger="' + amount + '">{{a}}</div>' ,
97+ template : '<div v-repeat="list" v-transition="stagger" stagger="' + delayAmount + '">{{a}}</div>' ,
9798 data : {
9899 list : [ ]
99100 } ,
@@ -121,7 +122,7 @@ describe('Staggering Transitions', function () {
121122 '<div class="stagger-transition">1</div>'
122123 )
123124 done ( )
124- } , amount * 3 )
125+ } , delayAmount * 3 )
125126 } )
126127 } )
127128
@@ -148,10 +149,10 @@ describe('Staggering Transitions', function () {
148149 setTimeout ( function ( ) {
149150 expect ( el . innerHTML ) . toBe ( '' )
150151 done ( )
151- } , amount * 2 )
152+ } , delayAmount * multiplier )
152153 } )
153154 } )
154- } , amount * 2 )
155+ } , delayAmount * multiplier )
155156 } )
156157 } )
157158 }
0 commit comments