Skip to content

Commit

Permalink
Fix broken project CLI tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Castro, Mario committed Dec 5, 2024
1 parent 0fdc542 commit 70f284c
Showing 1 changed file with 25 additions and 23 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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',
Expand All @@ -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',
Expand Down Expand Up @@ -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',
Expand Down Expand Up @@ -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',
Expand Down

0 comments on commit 70f284c

Please sign in to comment.