// lib/util/test-path.mjs // What counts as a test file, by its path. One reading for every caller: the // floor guard (test-integrity.mjs) reads a diff with it, and the plan reader // (plan-schema.mjs `stepTestsOnly`) asks whether a step holds nothing but tests. const TEST_PATH_RE = [ /(^|\/)(tests?|__tests__|spec|specs)\//, /\.(test|spec)\.[a-z0-9]+$/i, /_(test|spec)\.[a-z0-9]+$/i, /(^|\/)test_[^/]*\.py$/, ]; export function isTestPath(p) { return TEST_PATH_RE.some((re) => re.test(p)); }