Skip to content

Commit

Permalink
Update tests to accomodate for changes
Browse files Browse the repository at this point in the history
  • Loading branch information
Nikolai Laevskii committed May 31, 2023
1 parent 8f71719 commit 6eb2af6
Showing 1 changed file with 40 additions and 5 deletions.
45 changes: 40 additions & 5 deletions __tests__/installer.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -102,8 +102,15 @@ describe('installer tests', () => {

await dotnetInstaller.installDotnet();

/**
* First time script would be called to
* install runtime, here we checking only the
* second one that installs actual SDK. i.e. 1
*/
const callIndex = 1;

const scriptArguments = (
getExecOutputSpy.mock.calls[0][1] as string[]
getExecOutputSpy.mock.calls[callIndex][1] as string[]
).join(' ');
const expectedArgument = IS_WINDOWS
? `-Version ${inputVersion}`
Expand Down Expand Up @@ -185,8 +192,15 @@ describe('installer tests', () => {

await dotnetInstaller.installDotnet();

/**
* First time script would be called to
* install runtime, here we checking only the
* second one that installs actual SDK. i.e. 1
*/
const callIndex = 1;

const scriptArguments = (
getExecOutputSpy.mock.calls[0][1] as string[]
getExecOutputSpy.mock.calls[callIndex][1] as string[]
).join(' ');
const expectedArgument = IS_WINDOWS
? `-Quality ${inputQuality}`
Expand Down Expand Up @@ -218,8 +232,15 @@ describe('installer tests', () => {

await dotnetInstaller.installDotnet();

/**
* First time script would be called to
* install runtime, here we checking only the
* second one that installs actual SDK. i.e. 1
*/
const callIndex = 1;

const scriptArguments = (
getExecOutputSpy.mock.calls[0][1] as string[]
getExecOutputSpy.mock.calls[callIndex][1] as string[]
).join(' ');
const expectedArgument = IS_WINDOWS
? `-Channel 6.0`
Expand Down Expand Up @@ -252,8 +273,15 @@ describe('installer tests', () => {

await dotnetInstaller.installDotnet();

/**
* First time script would be called to
* install runtime, here we checking only the
* second one that installs actual SDK. i.e. 1
*/
const callIndex = 1;

const scriptArguments = (
getExecOutputSpy.mock.calls[0][1] as string[]
getExecOutputSpy.mock.calls[callIndex][1] as string[]
).join(' ');

expect(scriptArguments).toContain(
Expand Down Expand Up @@ -283,8 +311,15 @@ describe('installer tests', () => {

await dotnetInstaller.installDotnet();

/**
* First time script would be called to
* install runtime, here we checking only the
* second one that installs actual SDK. i.e. 1
*/
const callIndex = 1;

const scriptArguments = (
getExecOutputSpy.mock.calls[0][1] as string[]
getExecOutputSpy.mock.calls[callIndex][1] as string[]
).join(' ');

expect(scriptArguments).toContain(
Expand Down

0 comments on commit 6eb2af6

Please sign in to comment.