(absolutePath: string)
| 125 | * Returns the first POSIX-only pattern hit in the file, or null if Windows-safe. |
| 126 | */ |
| 127 | export function detectWindowsFragility(absolutePath: string): { reason: string } | null { |
| 128 | let content: string; |
| 129 | try { |
| 130 | content = fs.readFileSync(absolutePath, 'utf-8'); |
| 131 | } catch { |
| 132 | return null; |
| 133 | } |
| 134 | for (const { pattern, reason } of WINDOWS_FRAGILE_PATTERNS) { |
| 135 | if (pattern.test(content)) return { reason }; |
| 136 | } |
| 137 | return null; |
| 138 | } |
| 139 | |
| 140 | function walkTestFiles(dirPath: string): string[] { |
| 141 | const entries = fs.readdirSync(dirPath, { withFileTypes: true }); |
no outgoing calls
no test coverage detected