@@ -86,12 +86,16 @@ describe('extractInstancesFromReservations', function () {
8686 } )
8787
8888 it ( 'flattens the reservationList' , async function ( ) {
89- const actualResult = client . getInstancesFromReservations ( intoCollection ( completeReservationsList ) )
89+ const actualResult = await client
90+ . getInstancesFromReservations ( intoCollection ( completeReservationsList ) )
91+ . promise ( )
9092 assert . deepStrictEqual ( actualResult , completeInstanceList )
9193 } )
9294
9395 it ( 'handles undefined and missing pieces in the ReservationList.' , async function ( ) {
94- const actualResult = client . getInstancesFromReservations ( intoCollection ( incompleteReservationsList ) )
96+ const actualResult = await client
97+ . getInstancesFromReservations ( intoCollection ( incompleteReservationsList ) )
98+ . promise ( )
9599 assert . deepStrictEqual ( actualResult , incomepleteInstanceList )
96100 } )
97101} )
@@ -102,8 +106,10 @@ describe('updateInstancesDetail', async function () {
102106 client = new Ec2Client ( 'test-region' )
103107 } )
104108
105- it ( 'adds appropriate status and name field to the instance' , function ( ) {
106- const actualResult = client . updateInstancesDetail ( intoCollection ( completeInstanceList ) , getStatus )
109+ it ( 'adds appropriate status and name field to the instance' , async function ( ) {
110+ const actualResult = await client
111+ . updateInstancesDetail ( intoCollection ( completeInstanceList ) , getStatus )
112+ . promise ( )
107113 const expectedResult = [
108114 {
109115 InstanceId : 'running-1' ,
@@ -134,8 +140,10 @@ describe('updateInstancesDetail', async function () {
134140 assert . deepStrictEqual ( actualResult , expectedResult )
135141 } )
136142
137- it ( 'handles incomplete and missing tag fields' , function ( ) {
138- const actualResult = client . updateInstancesDetail ( intoCollection ( incomepleteInstanceList ) , getStatus )
143+ it ( 'handles incomplete and missing tag fields' , async function ( ) {
144+ const actualResult = await client
145+ . updateInstancesDetail ( intoCollection ( incomepleteInstanceList ) , getStatus )
146+ . promise ( )
139147
140148 const expectedResult = [
141149 { InstanceId : 'running-1' , LastSeenStatus : 'running' } ,
0 commit comments