Skip to content

Commit 89e8026

Browse files
agallardolclaude
andcommitted
test(worktree): parameterise duplicate-check tests with it.each
Matches the existing it.each pattern for the ASCII-letter check in the same file. Net -3 lines, same coverage. Per Greptile review feedback on #2149. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1 parent 3657b5d commit 89e8026

1 file changed

Lines changed: 5 additions & 6 deletions

File tree

packages/git/src/worktree-names.test.ts

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -33,12 +33,11 @@ describe("worktree name word lists", () => {
3333
expect(ADJECTIVES.length * NOUNS.length).toBeGreaterThanOrEqual(10_000);
3434
});
3535

36-
it("has no duplicate adjectives", () => {
37-
expect(new Set(ADJECTIVES).size).toBe(ADJECTIVES.length);
38-
});
39-
40-
it("has no duplicate nouns", () => {
41-
expect(new Set(NOUNS).size).toBe(NOUNS.length);
36+
it.each([
37+
["adjectives", ADJECTIVES],
38+
["nouns", NOUNS],
39+
] as const)("%s contain no duplicates", (_label, list) => {
40+
expect(new Set(list).size).toBe(list.length);
4241
});
4342

4443
it("has no overlap between adjectives and nouns", () => {

0 commit comments

Comments
 (0)