@@ -34,7 +34,7 @@ export const testParentNode = new Ec2ParentNode('fake-region', 'testPartition',
3434describe ( 'ec2ParentNode' , function ( ) {
3535 let testNode : Ec2ParentNode
3636 let client : Ec2Client
37- let getInstancesStub : sinon . SinonStub < [ filters ?: Filter [ ] | undefined ] , AsyncCollection < PatchedEc2Instance > >
37+ let getInstancesStub : sinon . SinonStub < [ filters ?: Filter [ ] | undefined ] , AsyncCollection < PatchedEc2Instance [ ] > >
3838 let clock : FakeTimers . InstalledClock
3939 let refreshStub : sinon . SinonStub < [ ] , Promise < void > >
4040 let statusUpdateStub : sinon . SinonStub < [ status : string ] , Promise < string > >
@@ -78,7 +78,7 @@ describe('ec2ParentNode', function () {
7878 { Name : 'firstOne' , InstanceId : '0' , LastSeenStatus : 'running' } ,
7979 { Name : 'secondOne' , InstanceId : '1' , LastSeenStatus : 'stopped' } ,
8080 ] satisfies PatchedEc2Instance [ ]
81- getInstancesStub . returns ( intoCollection ( instances ) )
81+ getInstancesStub . returns ( intoCollection ( [ instances ] ) )
8282 const childNodes = await testNode . getChildren ( )
8383
8484 assert . strictEqual ( childNodes . length , instances . length , 'Unexpected child count' )
@@ -101,7 +101,7 @@ describe('ec2ParentNode', function () {
101101 { Name : 'cd' , InstanceId : '5' , LastSeenStatus : 'running' } ,
102102 ] satisfies PatchedEc2Instance [ ]
103103
104- getInstancesStub . returns ( intoCollection ( instances ) )
104+ getInstancesStub . returns ( intoCollection ( [ instances ] ) )
105105
106106 const childNodes = await testNode . getChildren ( )
107107
@@ -124,7 +124,7 @@ describe('ec2ParentNode', function () {
124124 { Name : 'firstOne' , InstanceId : '2' , LastSeenStatus : 'running' } ,
125125 ] satisfies PatchedEc2Instance [ ]
126126
127- getInstancesStub . returns ( intoCollection ( instances ) )
127+ getInstancesStub . returns ( intoCollection ( [ instances ] ) )
128128
129129 const childNodes = await testNode . getChildren ( )
130130 assert . strictEqual ( childNodes . length , instances . length , 'Unexpected child count' )
@@ -138,7 +138,7 @@ describe('ec2ParentNode', function () {
138138 { Name : 'thirdOne' , InstanceId : '2' , LastSeenStatus : 'running' } ,
139139 ] satisfies PatchedEc2Instance [ ]
140140
141- getInstancesStub . returns ( intoCollection ( instances ) )
141+ getInstancesStub . returns ( intoCollection ( [ instances ] ) )
142142 await testNode . updateChildren ( )
143143 assert . strictEqual ( testNode . pollingSet . size , 1 )
144144 getInstancesStub . restore ( )
@@ -152,7 +152,7 @@ describe('ec2ParentNode', function () {
152152 { Name : 'thirdOne' , InstanceId : '2' , LastSeenStatus : 'running' } ,
153153 ] satisfies PatchedEc2Instance [ ]
154154
155- getInstancesStub . returns ( intoCollection ( instances ) )
155+ getInstancesStub . returns ( intoCollection ( [ instances ] ) )
156156
157157 await testNode . updateChildren ( )
158158 await clock . tickAsync ( 6000 )
@@ -166,7 +166,7 @@ describe('ec2ParentNode', function () {
166166 { Name : 'firstOne' , InstanceId : '0' , LastSeenStatus : 'pending' } ,
167167 ] satisfies PatchedEc2Instance [ ]
168168
169- getInstancesStub . returns ( intoCollection ( instances ) )
169+ getInstancesStub . returns ( intoCollection ( [ instances ] ) )
170170 await testNode . updateChildren ( )
171171
172172 sinon . assert . notCalled ( refreshStub )
@@ -179,7 +179,7 @@ describe('ec2ParentNode', function () {
179179 { Name : 'firstOne' , InstanceId : 'node1' , LastSeenStatus : 'pending' } ,
180180 ] satisfies PatchedEc2Instance [ ]
181181
182- getInstancesStub . returns ( intoCollection ( instances ) )
182+ getInstancesStub . returns ( intoCollection ( [ instances ] ) )
183183 await testNode . updateChildren ( )
184184 const node = testNode . getInstanceNode ( 'node1' )
185185 assert . strictEqual ( node . InstanceId , instances [ 0 ] . InstanceId )
@@ -191,7 +191,7 @@ describe('ec2ParentNode', function () {
191191 { Name : 'firstOne' , InstanceId : 'node1' , LastSeenStatus : 'pending' } ,
192192 ] satisfies PatchedEc2Instance [ ]
193193
194- getInstancesStub . returns ( intoCollection ( instances ) )
194+ getInstancesStub . returns ( intoCollection ( [ instances ] ) )
195195 await testNode . updateChildren ( )
196196 assert . throws ( ( ) => testNode . getInstanceNode ( 'node2' ) )
197197 getInstancesStub . restore ( )
@@ -202,7 +202,7 @@ describe('ec2ParentNode', function () {
202202 { Name : 'firstOne' , InstanceId : 'node1' , LastSeenStatus : 'pending' } ,
203203 ] satisfies PatchedEc2Instance [ ]
204204
205- getInstancesStub . returns ( intoCollection ( instances ) )
205+ getInstancesStub . returns ( intoCollection ( [ instances ] ) )
206206 await testNode . updateChildren ( )
207207 testNode . trackPendingNode ( 'node1' )
208208 assert . strictEqual ( testNode . pollingSet . size , 1 )
@@ -214,7 +214,7 @@ describe('ec2ParentNode', function () {
214214 { Name : 'firstOne' , InstanceId : 'node1' , LastSeenStatus : 'pending' } ,
215215 ] satisfies PatchedEc2Instance [ ]
216216
217- getInstancesStub . returns ( intoCollection ( instances ) )
217+ getInstancesStub . returns ( intoCollection ( [ instances ] ) )
218218 await testNode . updateChildren ( )
219219 assert . throws ( ( ) => testNode . trackPendingNode ( 'node2' ) )
220220 getInstancesStub . restore ( )
0 commit comments