From 27fd252a45a8311920fe4b7b23cea0165a246219 Mon Sep 17 00:00:00 2001 From: Matt Travi Date: Sun, 10 Sep 2023 09:38:30 -0500 Subject: [PATCH] test(integration): reversed the list of commits to align with conventional-changelog expectations based on https://github.com/conventional-changelog/conventional-changelog/issues/1121#issuecomment-1709206347. however, assuming the previous order actually aligned with how core provides the list, this will need to be coordinated with reversing that list somewhere --- test/integration.test.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/test/integration.test.js b/test/integration.test.js index fb45793b..1078a6d1 100644 --- a/test/integration.test.js +++ b/test/integration.test.js @@ -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")); });