| 22 | // ============================================================================ |
| 23 | |
| 24 | function loadConfig(): string { |
| 25 | const candidates = [ |
| 26 | path.resolve(__dirname, '../../../../../../.a3s/config.acl'), |
| 27 | path.resolve(__dirname, '../../../../../.a3s/config.acl'), |
| 28 | path.resolve(__dirname, '../../../../.a3s/config.acl'), |
| 29 | ]; |
| 30 | for (const p of candidates) { |
| 31 | if (fs.existsSync(p)) { |
| 32 | return fs.readFileSync(p, 'utf-8'); |
| 33 | } |
| 34 | } |
| 35 | throw new Error(`.a3s/config.acl not found. Tried: ${candidates.join(', ')}`); |
| 36 | } |
| 37 | |
| 38 | // ============================================================================ |
| 39 | // Test runner |