Skip to content

bug: tests/unit/roles.test.ts has 3 fully duplicated tests on main #2057

Description

@carlos-alm

Found while resolving merge conflicts on PR #1955.

git show origin/main:tests/unit/roles.test.ts currently contains three it(...) blocks that each appear TWICE, back-to-back, with byte-identical bodies:

  • excludes parameter-kind nodes from role classification entirely
  • does not classify interface members as dead
  • regression: used parameters, interface members, and a genuinely dead function are classified correctly together

Verified via diff on the two occurrence ranges in a clean git show origin/main:... dump — zero differences, confirming this is a real duplication already committed to main, not a display artifact.

Confirmed this is NOT present on PR #1955's own branch tip (each test appears exactly once there), so it was introduced by some other merge/resolution that landed on main independently, likely during an earlier /resolve in this same stacked-PR chain where tests/unit/roles.test.ts was a non-owned "take main's side" file and a merge produced a duplicated block that then propagated forward through subsequent merges.

Not a functional bug (duplicate it() names are legal in vitest and both copies pass), but it's dead weight and a sign a merge went subtly wrong somewhere in this chain's history. Worth a follow-up commit to git log -p the relevant history and remove the duplicate copies of these three tests.

Metadata

Metadata

Assignees

No one assigned

    Labels

    follow-upDeferred work from PR reviews that needs tracking

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions