Skip to content

Commit

Permalink
test(integration): reversed the list of commits to align with convent…
Browse files Browse the repository at this point in the history
…ional-changelog expectations

based on conventional-changelog/conventional-changelog#1121 (comment). however, assuming the previous order actually aligned with how core provides the list, this will need to be coordinated with reversing that list somewhere
  • Loading branch information
travi committed Sep 10, 2023
1 parent f3b88d3 commit 27fd252
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions test/integration.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -99,14 +99,14 @@ test('Accept a partial "parseOpts" object as option', async (t) => {

test("Exclude commits if they have a matching revert commits", async (t) => {
const commits = [
{ hash: "123", message: "feat(scope): First feature" },
{ hash: "456", message: "revert: feat(scope): First feature\n\nThis reverts commit 123.\n" },
{ message: "fix(scope): First fix" },
{ hash: "456", message: "revert: feat(scope): First feature\n\nThis reverts commit 123.\n" },
{ hash: "123", message: "feat(scope): First feature" },
];
const releaseType = await analyzeCommits({}, { cwd, commits, logger: t.context.logger });

t.is(releaseType, "patch");
t.true(t.context.log.calledWith("Analyzing commit: %s", commits[2].message));
t.true(t.context.log.calledWith("Analyzing commit: %s", commits[0].message));
t.true(t.context.log.calledWith("The release type for the commit is %s", "patch"));
t.true(t.context.log.calledWith("Analysis of %s commits complete: %s release", 3, "patch"));
});
Expand Down

0 comments on commit 27fd252

Please sign in to comment.