diff --git a/packages/cli-test/src/cli/cli-process.spec.ts b/packages/cli-test/src/cli/cli-process.spec.ts index e428b0d56..b687ddc5e 100644 --- a/packages/cli-test/src/cli/cli-process.spec.ts +++ b/packages/cli-test/src/cli/cli-process.spec.ts @@ -53,6 +53,10 @@ describe('SlackCLIProcess class', () => { cmd = new SlackCLIProcess('help', { skipUpdate: true }); await cmd.execAsync(); sandbox.assert.calledWithMatch(runAsyncSpy, '--skip-update'); + runAsyncSpy.resetHistory(); + cmd = new SlackCLIProcess('help', {}); // empty global options; so undefined skipUpdate option + await cmd.execAsync(); + sandbox.assert.calledWithMatch(runAsyncSpy, '--skip-update'); }); }); describe('command options', () => { diff --git a/packages/cli-test/src/cli/cli-process.ts b/packages/cli-test/src/cli/cli-process.ts index fe4a8baa1..c10a0e0b8 100644 --- a/packages/cli-test/src/cli/cli-process.ts +++ b/packages/cli-test/src/cli/cli-process.ts @@ -90,7 +90,7 @@ export class SlackCLIProcess { if (opts.qa || opts.dev) { cmd += ' --slackdev'; } - if (opts.skipUpdate) { + if (opts.skipUpdate || opts.skipUpdate === undefined) { cmd += ' --skip-update'; } if (opts.team) { diff --git a/packages/cli-test/src/cli/shell.ts b/packages/cli-test/src/cli/shell.ts index f50e7cb91..fef10387b 100644 --- a/packages/cli-test/src/cli/shell.ts +++ b/packages/cli-test/src/cli/shell.ts @@ -68,7 +68,7 @@ export const shell = { * - Execute child process with the command * - Wait for the command to complete and return the standard output * @param command cli command, e.g. --version or any shell command - * @param skipUpdate skip auto update notification + * @param shellOpts various shell spawning options available to customize * @returns command stdout */ runCommandSync: function runSyncCommand(