NaotoshiFujita пре 3 година
родитељ
комит
0db580ed9a

+ 3 - 3
src/js/components/Autoplay/test/event.test.ts

@@ -56,17 +56,17 @@ describe( 'Autoplay', () => {
     expect( progressRate ).toBeLessThan( 0.1 );
 
     // Around 1000ms
-    await wait( 1000 );
+    await wait( 1000 + 50 );
     expect( progressRate ).toBeGreaterThanOrEqual( 0.5 );
     expect( progressRate ).toBeLessThan( 1 );
 
     // Around 1600ms
-    await wait( 600 );
+    await wait( 600 + 50 );
     expect( progressRate ).toBeGreaterThanOrEqual( 0.8 );
     expect( progressRate ).toBeLessThan( 1 );
 
     // Around 2000ms
-    await wait( 400 );
+    await wait( 400 + 50 );
     expect( progressRate ).toBeLessThan( 0.1 );
   } );
 } );

+ 2 - 2
src/js/components/Scroll/test/general.test.ts

@@ -12,7 +12,7 @@ describe( 'Scroll', () => {
 
     splide.Components.Scroll.scroll( -100, duration );
 
-    await wait( duration + 10 );
+    await wait( duration + 50 );
 
     expect( Math.round( splide.Components.Move.getPosition() ) ).toBe( -100 );
 
@@ -32,7 +32,7 @@ describe( 'Scroll', () => {
 
     expect( getPosition() ).toBeGreaterThan( -100 );
 
-    await wait( duration / 2 + 10 );
+    await wait( duration / 2 + 50 );
 
     expect( Math.round( getPosition() ) ).toBe( -100 );