Skip to content

Commit

Permalink
.
Browse files Browse the repository at this point in the history
  • Loading branch information
ericsciple committed Nov 15, 2019
1 parent 2cadc23 commit 70e0eef
Showing 1 changed file with 14 additions and 3 deletions.
17 changes: 14 additions & 3 deletions packages/exec/__tests__/exec.test.ts
Expand Up @@ -479,7 +479,11 @@ describe('@actions/exec', () => {
}

expect(exitCode).toBe(0)
const toolPath = path.resolve(__dirname, execOptions.cwd, command)
const toolPath = path.resolve(
__dirname,
execOptions.cwd,
`${command}${IS_WINDOWS ? '.cmd' : ''}`
)
if (IS_WINDOWS) {
expect(outStream.getContents().split(os.EOL)[0]).toBe(
`[command]${process.env.ComSpec} /D /S /C "${toolPath} hello world"`
Expand Down Expand Up @@ -513,7 +517,11 @@ describe('@actions/exec', () => {
const exitCode = await exec.exec(`${command} hello world`, [], execOptions)

expect(exitCode).toBe(0)
const toolPath = path.resolve(__dirname, execOptions.cwd, command)
const toolPath = path.resolve(
__dirname,
execOptions.cwd,
`${command}${IS_WINDOWS ? '.cmd' : ''}`
)
if (IS_WINDOWS) {
expect(outStream.getContents().split(os.EOL)[0]).toBe(
`[command]${process.env.ComSpec} /D /S /C "${toolPath} hello world"`
Expand Down Expand Up @@ -554,7 +562,10 @@ describe('@actions/exec', () => {
}

expect(exitCode).toBe(0)
const toolPath = path.resolve(__dirname, command)
const toolPath = path.resolve(
__dirname,
`${command}${IS_WINDOWS ? '.cmd' : ''}`
)
if (IS_WINDOWS) {
expect(outStream.getContents().split(os.EOL)[0]).toBe(
`[command]${process.env.ComSpec} /D /S /C "${toolPath} hello world"`
Expand Down

0 comments on commit 70e0eef

Please sign in to comment.