()
| 93 | } |
| 94 | |
| 95 | function resolveAxePathFromPath(): string | null { |
| 96 | const pathValue = process.env.PATH ?? ''; |
| 97 | const entries = pathValue.split(delimiter).filter(Boolean); |
| 98 | for (const entry of entries) { |
| 99 | const candidate = join(entry, 'axe'); |
| 100 | if (isExecutable(candidate)) { |
| 101 | return candidate; |
| 102 | } |
| 103 | } |
| 104 | return null; |
| 105 | } |
| 106 | |
| 107 | export function resolveAxeBinary(): AxeBinary | null { |
| 108 | const configPath = resolveAxePathFromConfig(); |
no test coverage detected