Skip to content

Commit 40aefb0

Browse files
alexander-turnerclaude
authored andcommitted
chore: use kebab-case in changelog, rename inner function
- CHANGELOG: --collectTests → --collect-tests (matches what users type) - Rename inner collectTests() to collectEntries() to avoid shadowing the config key name https://claude.ai/code/session_018SbTXFCAujDRRjBFtMTFXU
1 parent 2326f29 commit 40aefb0

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

CHANGELOG.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
### Features
44

5-
- `[jest-circus, jest-cli, jest-config, jest-core, jest-jasmine2, jest-types]` Add `--collectTests` flag to discover and list tests without executing them ([#16006](https://github.com/jestjs/jest/pull/16006))
5+
- `[jest-circus, jest-cli, jest-config, jest-core, jest-jasmine2, jest-types]` Add `--collect-tests` flag to discover and list tests without executing them ([#16006](https://github.com/jestjs/jest/pull/16006))
66

77
## 30.3.0
88

packages/jest-circus/src/legacy-code-todo-rewrite/jestAdapterInit.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,7 @@ export const collectTestsWithoutRunning = async ({
149149
}): Promise<TestResult> => {
150150
const {rootDescribeBlock, testNamePattern} = getRunnerState();
151151

152-
const collectTests = (
152+
const collectEntries = (
153153
block: Circus.DescribeBlock,
154154
): Array<Circus.TestEntry> => {
155155
const entries: Array<Circus.TestEntry> = [];
@@ -159,12 +159,12 @@ export const collectTestsWithoutRunning = async ({
159159
entries.push(child);
160160
}
161161
} else if (child.type === 'describeBlock') {
162-
entries.push(...collectTests(child));
162+
entries.push(...collectEntries(child));
163163
}
164164
}
165165
return entries;
166166
};
167-
const testEntries = collectTests(rootDescribeBlock);
167+
const testEntries = collectEntries(rootDescribeBlock);
168168

169169
const assertionResults: Array<AssertionResult> = testEntries.map(test => {
170170
const ancestorTitles = getTestNamesPath(test).filter(

0 commit comments

Comments
 (0)