From 70f284c8a81e071dfe07eccc7be001cc255251e2 Mon Sep 17 00:00:00 2001 From: "Castro, Mario" Date: Thu, 5 Dec 2024 15:18:39 -0300 Subject: [PATCH] Fix broken project CLI tests --- .../cli/cli.project.integration.ts | 48 ++++++++++--------- 1 file changed, 25 insertions(+), 23 deletions(-) diff --git a/packages/framework-integration-tests/integration/provider-unaware/cli/cli.project.integration.ts b/packages/framework-integration-tests/integration/provider-unaware/cli/cli.project.integration.ts index a6e7a0220..a235c2b60 100644 --- a/packages/framework-integration-tests/integration/provider-unaware/cli/cli.project.integration.ts +++ b/packages/framework-integration-tests/integration/provider-unaware/cli/cli.project.integration.ts @@ -116,7 +116,9 @@ describe('Project', () => { promptAnswers?: PromptAnswers ): Promise<{ stdout: string; stderr: string }> => { const cleanFlags = flags.map((flag) => flag.replace(/^["'](.+)["']$/, '$1')) - const cliProcess = execa(cliPath, ['new:project', projectName, ...cleanFlags], { cwd: SANDBOX_INTEGRATION_DIR }) + const cliProcess = execa(cliPath, ['new:project', projectName, ...cleanFlags], { + cwd: SANDBOX_INTEGRATION_DIR, + }) if (promptAnswers) { await handlePrompt(cliProcess, promptAnswers) @@ -243,19 +245,19 @@ describe('Project', () => { const projectName = 'cart-demo-short-flags' const flags = [ '-a', - AUTHOR, + `"${AUTHOR}"`, '-d', - DESCRIPTION, + `"${DESCRIPTION}"`, '-H', - HOMEPAGE, + `'${HOMEPAGE}'`, '-l', - LICENSE, + `"${LICENSE}"`, '-p', - PROVIDER, + `"${PROVIDER}"`, '-r', - REPO_URL, + `'${REPO_URL}'`, '-v', - VERSION, + `"${VERSION}"`, // We skip dependencies and git installation to make this test faster '--skipInstall', '--skipGit', @@ -269,19 +271,19 @@ describe('Project', () => { const projectName = 'cart-demo-long-flags' const flags = [ '--author', - AUTHOR, + `"${AUTHOR}"`, '--description', - DESCRIPTION, + `"${DESCRIPTION}"`, '--homepage', - HOMEPAGE, + `'${HOMEPAGE}'`, '--license', - LICENSE, + `"${LICENSE}"`, '--providerPackageName', - PROVIDER, + `"${PROVIDER}"`, '--repository', - REPO_URL, + `'${REPO_URL}'`, '--version', - VERSION, + `"${VERSION}"`, // We skip dependencies and git installation to make this test faster '--skipInstall', '--skipGit', @@ -389,9 +391,9 @@ describe('Project', () => { } const flags = [ '--providerPackageName', - PROVIDER, + `"${PROVIDER}"`, '--repository', - REPO_URL, + `"${REPO_URL}"`, // We skip dependencies and git installation to make this test faster '--skipInstall', '--skipGit', @@ -420,19 +422,19 @@ describe('Project', () => { const flags = [ '--author ', - AUTHOR, + `"${AUTHOR}"`, '--description', - DESCRIPTION, + `"${DESCRIPTION}"`, '--homepage', - HOMEPAGE, + `"${HOMEPAGE}"`, '--license', - LICENSE, + `"${LICENSE}"`, '--providerPackageName', 'invalid-provider', '--repository', - REPO_URL, + `"${REPO_URL}"`, '--version', - VERSION, + `"${VERSION}"`, // We skip dependencies and git installation to make this test faster '--skipInstall', '--skipGit',