From f9ef0265d26f170729292961257999f7da22dec2 Mon Sep 17 00:00:00 2001 From: Eric Black Date: Tue, 5 Mar 2024 09:52:09 -0800 Subject: [PATCH] Fix shared tests --- .../cli/test/unit/commands/certs/info.unit.test.ts | 4 ++-- .../test/unit/commands/certs/shared_sni.unit.test.ts | 10 ++++------ 2 files changed, 6 insertions(+), 8 deletions(-) diff --git a/packages/cli/test/unit/commands/certs/info.unit.test.ts b/packages/cli/test/unit/commands/certs/info.unit.test.ts index 0ec3686489..20f9555e01 100644 --- a/packages/cli/test/unit/commands/certs/info.unit.test.ts +++ b/packages/cli/test/unit/commands/certs/info.unit.test.ts @@ -137,8 +137,8 @@ describe('heroku shared', function () { const stdout = function (certificateDetails: string) { return heredoc(` - Certificate details: - ${certificateDetails} +Certificate details: +${certificateDetails} `) } diff --git a/packages/cli/test/unit/commands/certs/shared_sni.unit.test.ts b/packages/cli/test/unit/commands/certs/shared_sni.unit.test.ts index 8317245e51..fe38e59354 100644 --- a/packages/cli/test/unit/commands/certs/shared_sni.unit.test.ts +++ b/packages/cli/test/unit/commands/certs/shared_sni.unit.test.ts @@ -39,7 +39,7 @@ export const shouldHandleArgs = function (commandText: string, command: GenericC 'tokyo-1050', ]) expectOutput(stderr.output, stderrOutput(endpoint)) - expectOutput(stdout.output, stdoutOutput(certificateDetails, endpoint)) + expectOutput(stdout.output, stdoutOutput(certificateDetails(), endpoint)) }) it('# errors out for --endpoint when there are multiple ', async function () { @@ -51,8 +51,6 @@ export const shouldHandleArgs = function (commandText: string, command: GenericC 'example', '--endpoint', 'tokyo-1050.herokussl.com', - '--confirm', - 'example', ]).catch(function (error: Error) { expect(error.message).to.equal('Must pass --name when more than one endpoint matches --endpoint') }) @@ -70,7 +68,7 @@ export const shouldHandleArgs = function (commandText: string, command: GenericC 'tokyo-1050.herokussl.com', ]) expectOutput(stderr.output, stderrOutput(endpoint)) - expectOutput(stdout.output, stdoutOutput(certificateDetails, endpoint)) + expectOutput(stdout.output, stdoutOutput(certificateDetails(), endpoint)) }) it('# --endpoint errors out if there is no match', async function () { @@ -80,6 +78,8 @@ export const shouldHandleArgs = function (commandText: string, command: GenericC await runCommand(command, [ '--app', 'example', + '--endpoint', + 'tokyo-1050.herokussl.com', ]).catch(function (error: Error) { expect(error.message).to.equal('Record not found.') }) @@ -94,8 +94,6 @@ export const shouldHandleArgs = function (commandText: string, command: GenericC 'example', '--name', 'tokyo-1050', - '--confirm', - 'example', ]).catch(function (error: Error) { expect(error.message).to.equal('More than one endpoint matches tokyo-1050, please file a support ticket') })