()
| 105 | } |
| 106 | |
| 107 | export function resolveAxeBinary(): AxeBinary | null { |
| 108 | const configPath = resolveAxePathFromConfig(); |
| 109 | if (configPath) { |
| 110 | return { path: configPath, source: 'env' }; |
| 111 | } |
| 112 | |
| 113 | const sourcePath = resolveAxePathFromSourceConfig(); |
| 114 | if (sourcePath) { |
| 115 | return { path: sourcePath, source: 'source' }; |
| 116 | } |
| 117 | |
| 118 | const bundledPath = resolveBundledAxePath(); |
| 119 | if (bundledPath) { |
| 120 | return { path: bundledPath, source: 'bundled' }; |
| 121 | } |
| 122 | |
| 123 | const pathBinary = resolveAxePathFromPath(); |
| 124 | if (pathBinary) { |
| 125 | return { path: pathBinary, source: 'path' }; |
| 126 | } |
| 127 | |
| 128 | return null; |
| 129 | } |
| 130 | |
| 131 | /** |
| 132 | * Get the path to the available axe binary |
no test coverage detected