From 1d6484dbd7a4bc0081ba2f491bb71a1f979dc103 Mon Sep 17 00:00:00 2001 From: quality <280983584+hivecommons-hive[bot]@users.noreply.github.com> Date: Mon, 19 Oct 2026 18:21:59 -0400 Subject: [PATCH] test(mergeQueue): pin each classify alternative and enqueuedByBot's ^ anchor individually A single-operator mutation probe over src/utils/mergeQueue.ts (23 mutants) left six non-equivalent survivors against the related suite (1166 tests): dropping the ^ anchor of botLoginPattern, or any one of the 'expected head', 'head oid', 'required', 'checks' and 'forbidden' alternatives of classify, changed nothing a test asserts, because every existing fixture message satisfies two alternatives at once and no login carries github-actions as a suffix. Adds one classify row per uncovered alternative and a my-github-actions login that must not count as a bot. Signed-off-by: quality <280983584+hivecommons-hive[bot]@users.noreply.github.com> --- __tests__/utils/mergeQueue.test.ts | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/__tests__/utils/mergeQueue.test.ts b/__tests__/utils/mergeQueue.test.ts index 4c741fa4..c06236c0 100644 --- a/__tests__/utils/mergeQueue.test.ts +++ b/__tests__/utils/mergeQueue.test.ts @@ -168,12 +168,18 @@ describe('enqueue', () => { it.each([ ['The expected head OID does not match', 'head_moved'], ['expectedHeadOid mismatch: head_oid changed', 'head_moved'], + // one message per alternative, so no wording is covered only by its neighbour + ['expected head did not match', 'head_moved'], + ['the head OID of the pull request has changed', 'head_moved'], ['Pull request is already in the merge queue', 'already_queued'], ['Pull request is not mergeable', 'not_ready'], ['Required status checks have not passed', 'not_ready'], + ['Required reviews are missing', 'not_ready'], + ['Checks are still running', 'not_ready'], ['Pull request is not ready to be enqueued', 'not_ready'], ['Resource not accessible by integration', 'forbidden'], ['You do not have permission to enqueue', 'forbidden'], + ['Forbidden', 'forbidden'], ['Something unexpected', 'other'], ])('classifies "%s" as %s', async (message, kind) => { graphql(null, message) @@ -233,6 +239,7 @@ describe('enqueuedByBot', () => { ['renovate[BOT]', true], ['alice', false], ['github-actions-fan', false], + ['my-github-actions', false], ['bot', false], ])('%s -> %s', (login, expected) => { expect(enqueuedByBot({ state: 'QUEUED', position: 1, enqueuer: login })).toBe(expected)