@@ -5,7 +5,7 @@ import { nextFrame } from 'web/runtime/transition-util'
5
5
6
6
if ( ! isIE9 ) {
7
7
describe ( 'Transition mode' , ( ) => {
8
- const duration = injectStyles ( )
8
+ const { duration, buffer } = injectStyles ( )
9
9
const components = {
10
10
one : { template : '<div>one</div>' } ,
11
11
two : { template : '<div>two</div>' }
@@ -40,7 +40,7 @@ if (!isIE9) {
40
40
'<div class="test v-leave-active">one</div>' +
41
41
'<div class="test v-enter-active">two</div>'
42
42
)
43
- } ) . thenWaitFor ( duration + 10 ) . then ( ( ) => {
43
+ } ) . thenWaitFor ( duration + buffer ) . then ( ( ) => {
44
44
expect ( vm . $el . innerHTML ) . toBe (
45
45
'<div class="test">two</div>'
46
46
)
@@ -84,7 +84,7 @@ if (!isIE9) {
84
84
expect ( vm . $el . innerHTML ) . toBe (
85
85
'<div class="test test-enter-active">two</div>'
86
86
)
87
- } ) . thenWaitFor ( duration + 10 ) . then ( ( ) => {
87
+ } ) . thenWaitFor ( duration + buffer ) . then ( ( ) => {
88
88
expect ( vm . $el . innerHTML ) . toBe (
89
89
'<div class="test">two</div>'
90
90
)
@@ -132,7 +132,7 @@ if (!isIE9) {
132
132
expect ( vm . $el . innerHTML ) . toBe (
133
133
'<div class="test test-enter-active">two</div>'
134
134
)
135
- } ) . thenWaitFor ( duration + 10 ) . then ( ( ) => {
135
+ } ) . thenWaitFor ( duration + buffer ) . then ( ( ) => {
136
136
expect ( vm . $el . innerHTML ) . toBe (
137
137
'<div class="test">two</div>'
138
138
)
@@ -183,7 +183,7 @@ if (!isIE9) {
183
183
'<div class="test test-leave-active">one</div>' +
184
184
'<div class="test">two</div>'
185
185
)
186
- } ) . thenWaitFor ( duration + 10 ) . then ( ( ) => {
186
+ } ) . thenWaitFor ( duration + buffer ) . then ( ( ) => {
187
187
expect ( vm . $el . innerHTML ) . toBe (
188
188
'<div class="test">two</div>'
189
189
)
@@ -249,7 +249,7 @@ if (!isIE9) {
249
249
'<div class="test test-leave-active">two</div>' +
250
250
'<div class="test">one</div>'
251
251
)
252
- } ) . thenWaitFor ( duration + 10 ) . then ( ( ) => {
252
+ } ) . thenWaitFor ( duration + buffer ) . then ( ( ) => {
253
253
expect ( vm . $el . innerHTML ) . toBe (
254
254
'<div class="test">one</div>'
255
255
)
@@ -278,7 +278,7 @@ if (!isIE9) {
278
278
'<div class="test v-leave-active">one</div>' +
279
279
'<div class="test v-enter-active">two</div>'
280
280
)
281
- } ) . thenWaitFor ( duration + 10 ) . then ( ( ) => {
281
+ } ) . thenWaitFor ( duration + buffer ) . then ( ( ) => {
282
282
expect ( vm . $el . innerHTML ) . toBe (
283
283
'<div class="test">two</div>'
284
284
)
@@ -321,7 +321,7 @@ if (!isIE9) {
321
321
expect ( vm . $el . innerHTML ) . toBe (
322
322
'<div class="test test-enter-active">two</div>'
323
323
)
324
- } ) . thenWaitFor ( duration + 10 ) . then ( ( ) => {
324
+ } ) . thenWaitFor ( duration + buffer ) . then ( ( ) => {
325
325
expect ( vm . $el . innerHTML ) . toBe (
326
326
'<div class="test">two</div>'
327
327
)
@@ -371,7 +371,7 @@ if (!isIE9) {
371
371
'<div class="test test-leave-active">one</div>' +
372
372
'<div class="test">two</div>'
373
373
)
374
- } ) . thenWaitFor ( duration + 10 ) . then ( ( ) => {
374
+ } ) . thenWaitFor ( duration + buffer ) . then ( ( ) => {
375
375
expect ( vm . $el . innerHTML ) . toBe (
376
376
'<div class="test">two</div>'
377
377
)
0 commit comments