@@ -102,8 +102,15 @@ describe('installer tests', () => {
102102
103103 await dotnetInstaller . installDotnet ( ) ;
104104
105+ /**
106+ * First time script would be called to
107+ * install runtime, here we checking only the
108+ * second one that installs actual SDK. i.e. 1
109+ */
110+ const callIndex = 1 ;
111+
105112 const scriptArguments = (
106- getExecOutputSpy . mock . calls [ 0 ] [ 1 ] as string [ ]
113+ getExecOutputSpy . mock . calls [ callIndex ] [ 1 ] as string [ ]
107114 ) . join ( ' ' ) ;
108115 const expectedArgument = IS_WINDOWS
109116 ? `-Version ${ inputVersion } `
@@ -185,8 +192,15 @@ describe('installer tests', () => {
185192
186193 await dotnetInstaller . installDotnet ( ) ;
187194
195+ /**
196+ * First time script would be called to
197+ * install runtime, here we checking only the
198+ * second one that installs actual SDK. i.e. 1
199+ */
200+ const callIndex = 1 ;
201+
188202 const scriptArguments = (
189- getExecOutputSpy . mock . calls [ 0 ] [ 1 ] as string [ ]
203+ getExecOutputSpy . mock . calls [ callIndex ] [ 1 ] as string [ ]
190204 ) . join ( ' ' ) ;
191205 const expectedArgument = IS_WINDOWS
192206 ? `-Quality ${ inputQuality } `
@@ -218,8 +232,15 @@ describe('installer tests', () => {
218232
219233 await dotnetInstaller . installDotnet ( ) ;
220234
235+ /**
236+ * First time script would be called to
237+ * install runtime, here we checking only the
238+ * second one that installs actual SDK. i.e. 1
239+ */
240+ const callIndex = 1 ;
241+
221242 const scriptArguments = (
222- getExecOutputSpy . mock . calls [ 0 ] [ 1 ] as string [ ]
243+ getExecOutputSpy . mock . calls [ callIndex ] [ 1 ] as string [ ]
223244 ) . join ( ' ' ) ;
224245 const expectedArgument = IS_WINDOWS
225246 ? `-Channel 6.0`
@@ -252,8 +273,15 @@ describe('installer tests', () => {
252273
253274 await dotnetInstaller . installDotnet ( ) ;
254275
276+ /**
277+ * First time script would be called to
278+ * install runtime, here we checking only the
279+ * second one that installs actual SDK. i.e. 1
280+ */
281+ const callIndex = 1 ;
282+
255283 const scriptArguments = (
256- getExecOutputSpy . mock . calls [ 0 ] [ 1 ] as string [ ]
284+ getExecOutputSpy . mock . calls [ callIndex ] [ 1 ] as string [ ]
257285 ) . join ( ' ' ) ;
258286
259287 expect ( scriptArguments ) . toContain (
@@ -283,8 +311,15 @@ describe('installer tests', () => {
283311
284312 await dotnetInstaller . installDotnet ( ) ;
285313
314+ /**
315+ * First time script would be called to
316+ * install runtime, here we checking only the
317+ * second one that installs actual SDK. i.e. 1
318+ */
319+ const callIndex = 1 ;
320+
286321 const scriptArguments = (
287- getExecOutputSpy . mock . calls [ 0 ] [ 1 ] as string [ ]
322+ getExecOutputSpy . mock . calls [ callIndex ] [ 1 ] as string [ ]
288323 ) . join ( ' ' ) ;
289324
290325 expect ( scriptArguments ) . toContain (
0 commit comments