Skip to content

Commit 2f39976

Browse files
committed
test(tests): adjust expected commit messages to new inferred scope
Update integration tests to expect the inferred scope "a" instead of "src" due to changes in scope inference logic.
1 parent a323526 commit 2f39976

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

tests/integration/workflow.test.ts

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -295,7 +295,7 @@ describe("runWorkflow", () => {
295295

296296
expect(result.ok).toBe(true);
297297
if (result.ok) expect(result.ticket).toBe("XYZ-999");
298-
expect(gitMock.gitCommit).toHaveBeenCalledWith("fix(src): tighten parser flow\n\nRefs XYZ-999", { noVerify: false });
298+
expect(gitMock.gitCommit).toHaveBeenCalledWith("fix(a): tighten parser flow\n\nRefs XYZ-999", { noVerify: false });
299299
});
300300

301301
it("returns and persists the actual final scope when an edited message omits scope", async () => {
@@ -439,7 +439,7 @@ describe("runWorkflow", () => {
439439
}));
440440

441441
expect(result.ok).toBe(true);
442-
expect(gitMock.gitCommit).toHaveBeenCalledWith("fix(src): tighten parser flow\n\nRefs ABC-123", { noVerify: false });
442+
expect(gitMock.gitCommit).toHaveBeenCalledWith("fix(a): tighten parser flow\n\nRefs ABC-123", { noVerify: false });
443443
});
444444

445445
it("includes inferred ticket and alternatives in dry-run results", async () => {
@@ -454,7 +454,7 @@ describe("runWorkflow", () => {
454454
expect(result.ok).toBe(true);
455455
if (result.ok) {
456456
expect(result.ticket).toBe("ABC-123");
457-
expect(result.alternatives).toEqual(["feat(src): add ranking support\n\nRefs ABC-123"]);
457+
expect(result.alternatives).toEqual(["feat(a): add ranking support\n\nRefs ABC-123"]);
458458
}
459459
});
460460

@@ -469,8 +469,8 @@ describe("runWorkflow", () => {
469469
expect(result.ok).toBe(true);
470470
expect(ollamaMock.ollamaChat).toHaveBeenCalledTimes(1);
471471
if (result.ok) {
472-
expect(result.message).toBe("feat(src): add baseline\n\nRefs ABC-123");
473-
expect(result.alternatives).toEqual(["feat(src): add ranking support\n\nRefs ABC-123"]);
472+
expect(result.message).toBe("feat(a): add baseline\n\nRefs ABC-123");
473+
expect(result.alternatives).toEqual(["feat(a): add ranking support\n\nRefs ABC-123"]);
474474
}
475475
});
476476

@@ -488,7 +488,7 @@ describe("runWorkflow", () => {
488488
expect(result.ok).toBe(true);
489489
expect(ollamaMock.ollamaChat).toHaveBeenCalledTimes(3);
490490
if (result.ok) {
491-
expect(result.alternatives).toEqual(["feat(src): add ranking support\n\nRefs ABC-123"]);
491+
expect(result.alternatives).toEqual(["feat(a): add ranking support\n\nRefs ABC-123"]);
492492
}
493493
});
494494

0 commit comments

Comments
 (0)