Skip to content

Commit

Permalink
Fix broken CLI tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Castro, Mario committed Dec 5, 2024
1 parent 9346515 commit 123e787
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,10 @@ describe('Project', () => {

before(async () => {
// Required by Github actions CI/CD, because it doesn't have git configured
await command('git config --global user.name || git config --global user.name "Booster Test"')
await command('git config --global user.email || git config --global user.email "test@booster.cloud"')
await command('git config --global user.name || git config --global user.name "Booster Test"', { shell: true })
await command('git config --global user.email || git config --global user.email "test@booster.cloud"', {
shell: true,
})

createFolder(SANDBOX_INTEGRATION_DIR)
})
Expand Down Expand Up @@ -114,6 +116,7 @@ describe('Project', () => {
): Promise<{ stdout: string; stderr: string }> => {
const cliProcess = command(`${cliPath} new:project ${projectName} ${flags.join(' ')}`, {
cwd: SANDBOX_INTEGRATION_DIR,
shell: true,
})

if (promptAnswers) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ describe('Read model', () => {

const { stdout } = await command(
cliPath + " new:read-model CartWithFieldsReadModel --fields 'items:Array<Item>'",
{ cwd: readModelSandboxDir }
{ cwd: readModelSandboxDir, shell: true }
)
expect(stdout).to.match(EXPECTED_OUTPUT_REGEX)

Expand All @@ -82,7 +82,7 @@ describe('Read model', () => {

const { stdout } = await command(
cliPath + " new:read-model CartWithProjectionReadModel --fields 'items:Array<Item>' --projects Cart:id",
{ cwd: readModelSandboxDir }
{ cwd: readModelSandboxDir, shell: true }
)
expect(stdout).to.match(EXPECTED_OUTPUT_REGEX)

Expand Down

0 comments on commit 123e787

Please sign in to comment.