@@ -79,7 +79,7 @@ test(`${promisify.name}: Rejects`, async () => {
7979describe ( wait . name , ( ) => {
8080 test ( "Waits for at least the specified time" , async ( ) => {
8181 const durations = [ 10 , 50 , 100 , 500 , 1000 ] ;
82-
82+
8383 for ( const duration of durations ) {
8484 const start = Date . now ( ) ;
8585 await wait ( duration ) ;
@@ -91,17 +91,19 @@ describe(wait.name, () => {
9191 test ( "Waits for at most the specified time" , async ( ) => {
9292 const durations = [ 10 , 50 , 100 , 500 , 1000 ] ;
9393 const iterations = 10 ;
94-
94+
9595 // The value of each trial is how much it overshot the duration
9696 const trials : Promise < number > [ ] = [ ] ;
9797 for ( let i = 0 ; i < iterations ; i ++ ) {
9898 for ( const duration of durations ) {
99- trials . push ( ( async ( ) => {
100- const start = Date . now ( ) ;
101- await wait ( duration ) ;
102- const end = Date . now ( ) ;
103- return end - start - duration ;
104- } ) ( ) ) ;
99+ trials . push (
100+ ( async ( ) => {
101+ const start = Date . now ( ) ;
102+ await wait ( duration ) ;
103+ const end = Date . now ( ) ;
104+ return end - start - duration ;
105+ } ) ( ) ,
106+ ) ;
105107 }
106108 }
107109
@@ -110,4 +112,4 @@ describe(wait.name, () => {
110112 expect ( result ) . toBeLessThanOrEqual ( 20 ) ;
111113 }
112114 } ) ;
113- } ) ;
115+ } ) ;
0 commit comments