Skip to content

test: mock git subprocess calls in create-pr.test.ts #754

Description

@sonukapoor

create-pr.test.ts runs real git commit calls during the test, which requires git user configuration to be present on the machine. On environments without a global git config (e.g. a fresh clone with no user.name/user.email), the test fails with:

Command failed: git commit -m "init"

The fix is to mock the git subprocess calls in the test rather than relying on a real git environment. The test should not depend on machine-level configuration to pass.

Related: #752 (proposes adding git config to CI as a workaround — the correct fix is in the test itself).

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workinggood first issueGood for newcomers

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions