MCPcopy Create free account
hub / github.com/colbymchenry/codegraph / isTestFile

Function isTestFile

src/search/query-utils.ts:439–444  ·  view source on GitHub ↗
(filePath: string)

Source from the content-addressed store, hash-verified

437 * means literally a test suite wants {@link isTestPath}.
438 */
439export function isTestFile(filePath: string): boolean {
440 // Non-production directories: examples, samples, benchmarks, fixtures, demos.
441 // Check both mid-path (/integration/) and start-of-path (integration/) since
442 // file paths may be stored as relative paths without a leading slash.
443 return isTestPath(filePath) || matchesNonProductionDir(filePath.toLowerCase());
444}
445
446/**
447 * Check if a file path names a TEST — a suite that exercises other code.

Callers 15

globalTypeMemberFunction · 0.90
isTestCodeFunction · 0.90
findRelevantContextMethod · 0.90
isLowValueFunction · 0.90
indirectTestNoteMethod · 0.90
toNodeRefFunction · 0.90
buildMapFunction · 0.90
summarizeTestCallersFunction · 0.90
summarizeBlastFunction · 0.90
buildFileFunction · 0.90
groupByFileFunction · 0.90

Calls 2

matchesNonProductionDirFunction · 0.85
isTestPathFunction · 0.70

Tested by 1

referenceFunction · 0.72