(relPath: string)
| 59 | }); |
| 60 | |
| 61 | function getFilePath(relPath: string): string { |
| 62 | const candidates = [ |
| 63 | resolve(relPath), |
| 64 | resolve(process.cwd(), relPath), |
| 65 | process.env['TEST_SRCDIR'] ? resolve(process.env['TEST_SRCDIR'], '_main', relPath) : null, |
| 66 | process.env['TEST_SRCDIR'] ? resolve(process.env['TEST_SRCDIR'], relPath) : null, |
| 67 | ].filter((p): p is string => Boolean(p)); |
| 68 | |
| 69 | for (const c of candidates) { |
| 70 | if (existsSync(c)) return c; |
| 71 | } |
| 72 | return resolve(relPath); |
| 73 | } |
no test coverage detected