Skip to content

Commit

Permalink
cli-test: expose --slackdev flag as qa option to all commands
Browse files Browse the repository at this point in the history
  • Loading branch information
Filip Maj committed May 28, 2024
1 parent a0e01c5 commit ba99b91
Show file tree
Hide file tree
Showing 8 changed files with 90 additions and 34 deletions.
16 changes: 10 additions & 6 deletions packages/cli-test/src/cli/commands/app.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,11 @@ import commandError from '../command-error';
export const del = async function appDelete(
appPath: string,
teamFlag: string,
options?: { isLocalApp?: boolean },
options?: { isLocalApp?: boolean, qa?: boolean },

Check warning on line 13 in packages/cli-test/src/cli/commands/app.ts

View check run for this annotation

Codecov / codecov/patch

packages/cli-test/src/cli/commands/app.ts#L13

Added line #L13 was not covered by tests
): Promise<string> {
// TODO: breaking change, separate params vs single-param-object
// TODO: breaking change, separate params vs single-param-object, probably should reflect global vs command CLI flags

Check warning on line 15 in packages/cli-test/src/cli/commands/app.ts

View check run for this annotation

Codecov / codecov/patch

packages/cli-test/src/cli/commands/app.ts#L15

Added line #L15 was not covered by tests
const appEnvironment = options?.isLocalApp ? 'local' : 'deployed';
const cmd = new SlackCLIProcess('app delete --force', { team: teamFlag }, {
const cmd = new SlackCLIProcess('app delete --force', { team: teamFlag, qa: options?.qa }, {

Check warning on line 17 in packages/cli-test/src/cli/commands/app.ts

View check run for this annotation

Codecov / codecov/patch

packages/cli-test/src/cli/commands/app.ts#L17

Added line #L17 was not covered by tests
'--app': appEnvironment,
});
try {
Expand All @@ -33,9 +33,13 @@ export const del = async function appDelete(
* @param teamFlag team domain where the app will be installed
* @returns command output
*/
export const install = async function workspaceInstall(appPath: string, teamFlag: string): Promise<string> {
// TODO: breaking change, separate params vs single-param-object
const cmd = new SlackCLIProcess('app install', { team: teamFlag });
export const install = async function workspaceInstall(
appPath: string,
teamFlag: string,
options?: { qa?: boolean },
): Promise<string> {
// TODO: breaking change, separate params vs single-param-object, probably should reflect global vs command CLI flags
const cmd = new SlackCLIProcess('app install', { team: teamFlag, qa: options?.qa });

Check warning on line 42 in packages/cli-test/src/cli/commands/app.ts

View check run for this annotation

Codecov / codecov/patch

packages/cli-test/src/cli/commands/app.ts#L37-L42

Added lines #L37 - L42 were not covered by tests
try {
const proc = await cmd.execAsync({
cwd: appPath,
Expand Down
14 changes: 10 additions & 4 deletions packages/cli-test/src/cli/commands/collaborator.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,10 @@ export const add = async function collaboratorsAdd(
appPath: string,
teamFlag: string,
collaboratorEmail: string,
options?: { qa?: boolean },

Check warning on line 15 in packages/cli-test/src/cli/commands/collaborator.ts

View check run for this annotation

Codecov / codecov/patch

packages/cli-test/src/cli/commands/collaborator.ts#L15

Added line #L15 was not covered by tests
): Promise<string> {
// TODO: (breaking change) separate parameters vs single-param-object
const cmd = new SlackCLIProcess(`collaborators add ${collaboratorEmail}`, { team: teamFlag });
const cmd = new SlackCLIProcess(`collaborators add ${collaboratorEmail}`, { team: teamFlag, qa: options?.qa });

Check warning on line 18 in packages/cli-test/src/cli/commands/collaborator.ts

View check run for this annotation

Codecov / codecov/patch

packages/cli-test/src/cli/commands/collaborator.ts#L18

Added line #L18 was not covered by tests
try {
const proc = await cmd.execAsync({
cwd: appPath,
Expand All @@ -31,9 +32,13 @@ export const add = async function collaboratorsAdd(
* @param teamFlag team domain to list collaborators for
* @returns command output
*/
export const list = async function collaboratorsList(appPath: string, teamFlag: string): Promise<string> {
export const list = async function collaboratorsList(
appPath: string,
teamFlag: string,
options?: { qa?: boolean },
): Promise<string> {

Check warning on line 39 in packages/cli-test/src/cli/commands/collaborator.ts

View check run for this annotation

Codecov / codecov/patch

packages/cli-test/src/cli/commands/collaborator.ts#L36-L39

Added lines #L36 - L39 were not covered by tests
// TODO: (breaking change) separate parameters vs single-param-object
const cmd = new SlackCLIProcess('collaborators list', { team: teamFlag });
const cmd = new SlackCLIProcess('collaborators list', { team: teamFlag, qa: options?.qa });

Check warning on line 41 in packages/cli-test/src/cli/commands/collaborator.ts

View check run for this annotation

Codecov / codecov/patch

packages/cli-test/src/cli/commands/collaborator.ts#L41

Added line #L41 was not covered by tests
try {
const proc = await cmd.execAsync({
cwd: appPath,
Expand All @@ -55,9 +60,10 @@ export const remove = async function collaboratorsRemove(
appPath: string,
teamFlag: string,
collaboratorEmail: string,
options?: { qa?: boolean },

Check warning on line 63 in packages/cli-test/src/cli/commands/collaborator.ts

View check run for this annotation

Codecov / codecov/patch

packages/cli-test/src/cli/commands/collaborator.ts#L63

Added line #L63 was not covered by tests
): Promise<string> {
// TODO: (breaking change) separate parameters vs single-param-object
const cmd = new SlackCLIProcess(`collaborators remove ${collaboratorEmail}`, { team: teamFlag });
const cmd = new SlackCLIProcess(`collaborators remove ${collaboratorEmail}`, { team: teamFlag, qa: options?.qa });

Check warning on line 66 in packages/cli-test/src/cli/commands/collaborator.ts

View check run for this annotation

Codecov / codecov/patch

packages/cli-test/src/cli/commands/collaborator.ts#L66

Added line #L66 was not covered by tests
try {
const proc = await cmd.execAsync({
cwd: appPath,
Expand Down
14 changes: 10 additions & 4 deletions packages/cli-test/src/cli/commands/env.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,10 @@ export const add = async function envAdd(
teamFlag: string,
secretKey: string,
secretValue: string,
options?: { qa?: boolean },

Check warning on line 17 in packages/cli-test/src/cli/commands/env.ts

View check run for this annotation

Codecov / codecov/patch

packages/cli-test/src/cli/commands/env.ts#L17

Added line #L17 was not covered by tests
): Promise<string> {
// TODO: (breaking change) separate parameters vs single-param-object
const cmd = new SlackCLIProcess(`env add ${secretKey} ${secretValue}`, { team: teamFlag });
const cmd = new SlackCLIProcess(`env add ${secretKey} ${secretValue}`, { team: teamFlag, qa: options?.qa });

Check warning on line 20 in packages/cli-test/src/cli/commands/env.ts

View check run for this annotation

Codecov / codecov/patch

packages/cli-test/src/cli/commands/env.ts#L20

Added line #L20 was not covered by tests
try {
const proc = await cmd.execAsync({
cwd: appPath,
Expand All @@ -33,9 +34,13 @@ export const add = async function envAdd(
* @param teamFlag team domain to list env vars for
* @returns command output
*/
export const list = async function envList(appPath: string, teamFlag: string): Promise<string> {
export const list = async function envList(
appPath: string,
teamFlag: string,
options?: { qa?: boolean },
): Promise<string> {

Check warning on line 41 in packages/cli-test/src/cli/commands/env.ts

View check run for this annotation

Codecov / codecov/patch

packages/cli-test/src/cli/commands/env.ts#L38-L41

Added lines #L38 - L41 were not covered by tests
// TODO: (breaking change) separate parameters vs single-param-object
const cmd = new SlackCLIProcess('env list', { team: teamFlag });
const cmd = new SlackCLIProcess('env list', { team: teamFlag, qa: options?.qa });

Check warning on line 43 in packages/cli-test/src/cli/commands/env.ts

View check run for this annotation

Codecov / codecov/patch

packages/cli-test/src/cli/commands/env.ts#L43

Added line #L43 was not covered by tests
try {
const proc = await cmd.execAsync({
cwd: appPath,
Expand All @@ -57,9 +62,10 @@ export const remove = async function envRemove(
appPath: string,
teamFlag: string,
secretKey: string,
options?: { qa?: boolean },

Check warning on line 65 in packages/cli-test/src/cli/commands/env.ts

View check run for this annotation

Codecov / codecov/patch

packages/cli-test/src/cli/commands/env.ts#L65

Added line #L65 was not covered by tests
): Promise<string> {
// TODO: (breaking change) separate parameters vs single-param-object
const cmd = new SlackCLIProcess(`env remove ${secretKey}`, { team: teamFlag });
const cmd = new SlackCLIProcess(`env remove ${secretKey}`, { team: teamFlag, qa: options?.qa });

Check warning on line 68 in packages/cli-test/src/cli/commands/env.ts

View check run for this annotation

Codecov / codecov/patch

packages/cli-test/src/cli/commands/env.ts#L68

Added line #L68 was not covered by tests
try {
const proc = await cmd.execAsync({
cwd: appPath,
Expand Down
3 changes: 2 additions & 1 deletion packages/cli-test/src/cli/commands/external-auth.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,12 @@ export const externalAuth = async function externalAuth(
teamFlag: string,
provider: string,
flags: string,
options?: { qa?: boolean },

Check warning on line 17 in packages/cli-test/src/cli/commands/external-auth.ts

View check run for this annotation

Codecov / codecov/patch

packages/cli-test/src/cli/commands/external-auth.ts#L17

Added line #L17 was not covered by tests
): Promise<string> {
// TODO: (breaking change) separate parameters vs single-param-object
// TODO: this is a generic entry point to the `external-auth` suite of commands, and today `flags` is abused to
// specify the actual sub-command. easy, but lazy, not sure if best approach
const cmd = new SlackCLIProcess(`external-auth ${flags}`, { team: teamFlag }, {
const cmd = new SlackCLIProcess(`external-auth ${flags}`, { team: teamFlag, qa: options?.qa }, {

Check warning on line 22 in packages/cli-test/src/cli/commands/external-auth.ts

View check run for this annotation

Codecov / codecov/patch

packages/cli-test/src/cli/commands/external-auth.ts#L22

Added line #L22 was not covered by tests
'--provider': provider,
});
try {
Expand Down
3 changes: 2 additions & 1 deletion packages/cli-test/src/cli/commands/function.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,10 @@ export const access = async function functionAccess(
appPath: string,
teamFlag: string,
flags: string,
options?: { qa?: boolean },

Check warning on line 18 in packages/cli-test/src/cli/commands/function.ts

View check run for this annotation

Codecov / codecov/patch

packages/cli-test/src/cli/commands/function.ts#L18

Added line #L18 was not covered by tests
): Promise<string> {
// TODO: breaking change, separate params vs single-param-object
const cmd = new SlackCLIProcess(`function access ${flags}`, { team: teamFlag });
const cmd = new SlackCLIProcess(`function access ${flags}`, { team: teamFlag, qa: options?.qa });

Check warning on line 21 in packages/cli-test/src/cli/commands/function.ts

View check run for this annotation

Codecov / codecov/patch

packages/cli-test/src/cli/commands/function.ts#L21

Added line #L21 was not covered by tests
try {
const proc = await cmd.execAsync({
cwd: appPath,
Expand Down
3 changes: 2 additions & 1 deletion packages/cli-test/src/cli/commands/manifest.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,10 @@ import commandError from '../command-error';
*/
export const validate = async function manifestValidate(
appPath: string,
options?: { qa?: boolean },

Check warning on line 11 in packages/cli-test/src/cli/commands/manifest.ts

View check run for this annotation

Codecov / codecov/patch

packages/cli-test/src/cli/commands/manifest.ts#L11

Added line #L11 was not covered by tests
): Promise<string> {
// TODO: breaking change, separate params vs single-param-object
const cmd = new SlackCLIProcess('manifest validate');
const cmd = new SlackCLIProcess('manifest validate', options);

Check warning on line 14 in packages/cli-test/src/cli/commands/manifest.ts

View check run for this annotation

Codecov / codecov/patch

packages/cli-test/src/cli/commands/manifest.ts#L14

Added line #L14 was not covered by tests
try {
const proc = await cmd.execAsync({
cwd: appPath,
Expand Down
20 changes: 16 additions & 4 deletions packages/cli-test/src/cli/commands/platform.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ export default {
teamFlag,
flag,
localApp = true,
qa = false,

Check warning on line 21 in packages/cli-test/src/cli/commands/platform.ts

View check run for this annotation

Codecov / codecov/patch

packages/cli-test/src/cli/commands/platform.ts#L21

Added line #L21 was not covered by tests
}: {
/** Path to app */
appPath: string;
Expand All @@ -27,9 +28,11 @@ export default {
flag?: string;
/** Whether to operate on the local or deployed app */
localApp?: boolean; // TODO: this option is provided inconsistently across commands (breaking change)
/** Whether to operate against --slackdev or production */
qa?: boolean; // TODO: this option is provided inconsistently across commands (breaking change)

Check warning on line 32 in packages/cli-test/src/cli/commands/platform.ts

View check run for this annotation

Codecov / codecov/patch

packages/cli-test/src/cli/commands/platform.ts#L31-L32

Added lines #L31 - L32 were not covered by tests
}): Promise<string> {
const appEnvironment = localApp ? 'local' : 'deployed';
const cmd = new SlackCLIProcess(`activity ${flag}`, { team: teamFlag }, {
const cmd = new SlackCLIProcess(`activity ${flag}`, { team: teamFlag, qa }, {

Check warning on line 35 in packages/cli-test/src/cli/commands/platform.ts

View check run for this annotation

Codecov / codecov/patch

packages/cli-test/src/cli/commands/platform.ts#L35

Added line #L35 was not covered by tests
'--app': appEnvironment,
});
try {
Expand All @@ -52,6 +55,7 @@ export default {
teamFlag,
stringToWaitFor,
localApp = true,
qa = false,

Check warning on line 58 in packages/cli-test/src/cli/commands/platform.ts

View check run for this annotation

Codecov / codecov/patch

packages/cli-test/src/cli/commands/platform.ts#L58

Added line #L58 was not covered by tests
}: {
/** Path to app */
appPath: string;
Expand All @@ -61,9 +65,11 @@ export default {
stringToWaitFor: string;
/** Whether to operate on the local or deployed app */
localApp?: boolean;
/** Whether to operate against --slackdev or production */
qa?: boolean; // TODO: this option is provided inconsistently across commands (breaking change)

Check warning on line 69 in packages/cli-test/src/cli/commands/platform.ts

View check run for this annotation

Codecov / codecov/patch

packages/cli-test/src/cli/commands/platform.ts#L68-L69

Added lines #L68 - L69 were not covered by tests
}): Promise<ShellProcess> {
const appEnvironment = localApp ? 'local' : 'deployed';
const cmd = new SlackCLIProcess('activity --tail', { team: teamFlag }, {
const cmd = new SlackCLIProcess('activity --tail', { team: teamFlag, qa }, {

Check warning on line 72 in packages/cli-test/src/cli/commands/platform.ts

View check run for this annotation

Codecov / codecov/patch

packages/cli-test/src/cli/commands/platform.ts#L72

Added line #L72 was not covered by tests
'--app': appEnvironment,
});
try {
Expand Down Expand Up @@ -112,6 +118,7 @@ export default {
teamFlag,
hideTriggers = true,
orgWorkspaceGrantFlag,
qa = false,

Check warning on line 121 in packages/cli-test/src/cli/commands/platform.ts

View check run for this annotation

Codecov / codecov/patch

packages/cli-test/src/cli/commands/platform.ts#L121

Added line #L121 was not covered by tests
}: {
/** Path to app */
appPath: string;
Expand All @@ -124,8 +131,10 @@ export default {
* to request grant access to in AAA scenarios
*/
orgWorkspaceGrantFlag?: string;
/** Whether to operate against --slackdev or production */
qa?: boolean; // TODO: this option is provided inconsistently across commands (breaking change)

Check warning on line 135 in packages/cli-test/src/cli/commands/platform.ts

View check run for this annotation

Codecov / codecov/patch

packages/cli-test/src/cli/commands/platform.ts#L134-L135

Added lines #L134 - L135 were not covered by tests
}): Promise<string> {
const cmd = new SlackCLIProcess('deploy', { team: teamFlag }, {
const cmd = new SlackCLIProcess('deploy', { team: teamFlag, qa }, {

Check warning on line 137 in packages/cli-test/src/cli/commands/platform.ts

View check run for this annotation

Codecov / codecov/patch

packages/cli-test/src/cli/commands/platform.ts#L137

Added line #L137 was not covered by tests
'--hide-triggers': hideTriggers,
'--org-workspace-grant': orgWorkspaceGrantFlag,
});
Expand All @@ -150,6 +159,7 @@ export default {
cleanup = true,
hideTriggers = true,
orgWorkspaceGrantFlag,
qa = false,

Check warning on line 162 in packages/cli-test/src/cli/commands/platform.ts

View check run for this annotation

Codecov / codecov/patch

packages/cli-test/src/cli/commands/platform.ts#L162

Added line #L162 was not covered by tests
}: {
/** Path to app */
appPath: string;
Expand All @@ -164,8 +174,10 @@ export default {
* to request grant access to in AAA scenarios
*/
orgWorkspaceGrantFlag?: string;
/** Whether to operate against --slackdev or production */
qa?: boolean; // TODO: this option is provided inconsistently across commands (breaking change)

Check warning on line 178 in packages/cli-test/src/cli/commands/platform.ts

View check run for this annotation

Codecov / codecov/patch

packages/cli-test/src/cli/commands/platform.ts#L177-L178

Added lines #L177 - L178 were not covered by tests
}): Promise<ShellProcess> {
const cmd = new SlackCLIProcess('run', { team: teamFlag }, {
const cmd = new SlackCLIProcess('run', { team: teamFlag, qa }, {

Check warning on line 180 in packages/cli-test/src/cli/commands/platform.ts

View check run for this annotation

Codecov / codecov/patch

packages/cli-test/src/cli/commands/platform.ts#L180

Added line #L180 was not covered by tests
'--cleanup': cleanup,
'--hide-triggers': hideTriggers,
'--org-workspace-grant': orgWorkspaceGrantFlag,
Expand Down
51 changes: 38 additions & 13 deletions packages/cli-test/src/cli/commands/trigger.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,15 @@ import commandError from '../command-error';
* @param flags specification of trigger access, e.g. --trigger-id Ft0143UPTAV8 --everyone
* @returns command output
*/
export const access = async function triggerAccess(appPath: string, teamFlag: string, flags: string): Promise<string> {
export const access = async function triggerAccess(
appPath: string,
teamFlag: string,
flags: string,
options?: { qa?: boolean },
): Promise<string> {

Check warning on line 19 in packages/cli-test/src/cli/commands/trigger.ts

View check run for this annotation

Codecov / codecov/patch

packages/cli-test/src/cli/commands/trigger.ts#L15-L19

Added lines #L15 - L19 were not covered by tests
// TODO: (breaking change) separate params vs. single-param-object
// TODO: access requires --trigger-id so add that to parameters (breaking change)
const cmd = new SlackCLIProcess(`trigger access ${flags}`, { team: teamFlag });
const cmd = new SlackCLIProcess(`trigger access ${flags}`, { team: teamFlag, qa: options?.qa });

Check warning on line 22 in packages/cli-test/src/cli/commands/trigger.ts

View check run for this annotation

Codecov / codecov/patch

packages/cli-test/src/cli/commands/trigger.ts#L22

Added line #L22 was not covered by tests
try {
const proc = await cmd.execAsync({
cwd: appPath,
Expand Down Expand Up @@ -46,12 +51,12 @@ export const create = async function triggerCreate({
options?: { // TODO: must be a better way of exposing these options
/** Local app for local run sessions */
localApp?: boolean;
/** Install app by selecting "Install to a new team" */
installApp?: boolean; // TODO: this isn't even used?
/** Whether to run against --slackdev or production */
qa?: boolean;

Check warning on line 55 in packages/cli-test/src/cli/commands/trigger.ts

View check run for this annotation

Codecov / codecov/patch

packages/cli-test/src/cli/commands/trigger.ts#L54-L55

Added lines #L54 - L55 were not covered by tests
};
}): Promise<string> {
const appEnvironment = options?.localApp ? 'local' : 'deployed';
const cmd = new SlackCLIProcess(`trigger create ${flag}`, { team: teamFlag }, {
const cmd = new SlackCLIProcess(`trigger create ${flag}`, { team: teamFlag, qa: options?.qa }, {

Check warning on line 59 in packages/cli-test/src/cli/commands/trigger.ts

View check run for this annotation

Codecov / codecov/patch

packages/cli-test/src/cli/commands/trigger.ts#L59

Added line #L59 was not covered by tests
'--app': appEnvironment,
'--org-workspace-grant': orgWorkspaceGrantFlag,
});
Expand All @@ -72,10 +77,15 @@ export const create = async function triggerCreate({
* @param flag
* @returns command output
*/
export const del = async function triggerDelete(appPath: string, teamFlag: string, flag: string): Promise<string> {
export const del = async function triggerDelete(
appPath: string,
teamFlag: string,
flag: string,
options?: { qa?: boolean },
): Promise<string> {

Check warning on line 85 in packages/cli-test/src/cli/commands/trigger.ts

View check run for this annotation

Codecov / codecov/patch

packages/cli-test/src/cli/commands/trigger.ts#L81-L85

Added lines #L81 - L85 were not covered by tests
// TODO: (breaking change) separate params vs. single-param-object
// TODO: delete requires --trigger-id so add that to parameters (breaking change)
const cmd = new SlackCLIProcess(`trigger delete ${flag}`, { team: teamFlag });
const cmd = new SlackCLIProcess(`trigger delete ${flag}`, { team: teamFlag, qa: options?.qa });

Check warning on line 88 in packages/cli-test/src/cli/commands/trigger.ts

View check run for this annotation

Codecov / codecov/patch

packages/cli-test/src/cli/commands/trigger.ts#L88

Added line #L88 was not covered by tests
try {
const proc = await cmd.execAsync({
cwd: appPath,
Expand All @@ -93,10 +103,15 @@ export const del = async function triggerDelete(appPath: string, teamFlag: strin
* @param flag arbitrary additional flags
* @returns command output
*/
export const info = async function triggerInfo(appPath: string, teamFlag: string, flag: string): Promise<string> {
export const info = async function triggerInfo(
appPath: string,
teamFlag: string,
flag: string,
options?: { qa?: boolean },
): Promise<string> {

Check warning on line 111 in packages/cli-test/src/cli/commands/trigger.ts

View check run for this annotation

Codecov / codecov/patch

packages/cli-test/src/cli/commands/trigger.ts#L107-L111

Added lines #L107 - L111 were not covered by tests
// TODO: getting trigger info necessitates passing a trigger ID, so that should be exposed in the parameters here
// TODO: (breaking change) separate params vs. single-param-object
const cmd = new SlackCLIProcess(`trigger info ${flag}`, { team: teamFlag });
const cmd = new SlackCLIProcess(`trigger info ${flag}`, { team: teamFlag, qa: options?.qa });

Check warning on line 114 in packages/cli-test/src/cli/commands/trigger.ts

View check run for this annotation

Codecov / codecov/patch

packages/cli-test/src/cli/commands/trigger.ts#L114

Added line #L114 was not covered by tests
try {
const proc = await cmd.execAsync({
cwd: appPath,
Expand All @@ -114,9 +129,14 @@ export const info = async function triggerInfo(appPath: string, teamFlag: string
* @param flag arbitrary additional flags to pass
* @returns command output
*/
export const list = async function triggerList(appPath: string, teamFlag: string, flag: string): Promise<string> {
export const list = async function triggerList(
appPath: string,
teamFlag: string,
flag: string,
options?: { qa?: boolean },
): Promise<string> {

Check warning on line 137 in packages/cli-test/src/cli/commands/trigger.ts

View check run for this annotation

Codecov / codecov/patch

packages/cli-test/src/cli/commands/trigger.ts#L133-L137

Added lines #L133 - L137 were not covered by tests
// TODO: (breaking change) separate params vs. single-param-object
const cmd = new SlackCLIProcess(`trigger list ${flag}`, { team: teamFlag });
const cmd = new SlackCLIProcess(`trigger list ${flag}`, { team: teamFlag, qa: options?.qa });

Check warning on line 139 in packages/cli-test/src/cli/commands/trigger.ts

View check run for this annotation

Codecov / codecov/patch

packages/cli-test/src/cli/commands/trigger.ts#L139

Added line #L139 was not covered by tests
try {
const proc = await cmd.execAsync({
cwd: appPath,
Expand All @@ -134,9 +154,14 @@ export const list = async function triggerList(appPath: string, teamFlag: string
* @param flag arbitrary additional flags to pass to command
* @returns command output
*/
export const update = async function triggerUpdate(appPath: string, teamFlag: string, flag: string): Promise<string> {
export const update = async function triggerUpdate(
appPath: string,
teamFlag: string,
flag: string,
options?: { qa?: boolean },
): Promise<string> {

Check warning on line 162 in packages/cli-test/src/cli/commands/trigger.ts

View check run for this annotation

Codecov / codecov/patch

packages/cli-test/src/cli/commands/trigger.ts#L158-L162

Added lines #L158 - L162 were not covered by tests
// TODO: (breaking change) separate params vs. single-param-object
const cmd = new SlackCLIProcess(`trigger update ${flag}`, { team: teamFlag });
const cmd = new SlackCLIProcess(`trigger update ${flag}`, { team: teamFlag, qa: options?.qa });

Check warning on line 164 in packages/cli-test/src/cli/commands/trigger.ts

View check run for this annotation

Codecov / codecov/patch

packages/cli-test/src/cli/commands/trigger.ts#L164

Added line #L164 was not covered by tests
try {
const proc = await cmd.execAsync({
cwd: appPath,
Expand Down

0 comments on commit ba99b91

Please sign in to comment.