Skip to content

Commit

Permalink
tests: add git local scope
Browse files Browse the repository at this point in the history
  • Loading branch information
brenoepics committed May 16, 2024
1 parent 88c2f1e commit 7a57173
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions __tests__/main.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,8 @@ test("run should warn when no files are found", () => {
test("pushChanges should commit and push changes successfully", async () => {
pushChanges(gitMock, inputParams, "Test commit message");
expect(gitMock.addConfig).toHaveBeenCalledTimes(2);
expect(gitMock.addConfig).toHaveBeenNthCalledWith(1, "user.name", inputParams.userName);
expect(gitMock.addConfig).toHaveBeenNthCalledWith(2, "user.email", inputParams.userEmail);
expect(gitMock.addConfig).toHaveBeenNthCalledWith(1, "user.name", inputParams.userName, undefined, "local");
expect(gitMock.addConfig).toHaveBeenNthCalledWith(2, "user.email", inputParams.userEmail, undefined, "local");
expect(gitMock.commit).toHaveBeenCalledWith("Test commit message");
expect(gitMock.push).toHaveBeenCalled();
});
Expand Down

0 comments on commit 7a57173

Please sign in to comment.