(p: string)
| 1282 | function pickClosestJvmCandidate(candidates: Node[], fromPath: string): Node { |
| 1283 | const fromDirs = fromPath.split('/').slice(0, -1); |
| 1284 | const sharedPrefix = (p: string): number => { |
| 1285 | const d = p.split('/').slice(0, -1); |
| 1286 | let shared = 0; |
| 1287 | for (let i = 0; i < Math.min(fromDirs.length, d.length); i++) { |
| 1288 | if (fromDirs[i] === d[i]) shared++; |
| 1289 | else break; |
| 1290 | } |
| 1291 | return shared; |
| 1292 | }; |
| 1293 | const isExpect = (n: Node): boolean => Array.isArray(n.decorators) && n.decorators.includes('expect'); |
| 1294 | let best = candidates[0]!; |
| 1295 | let bestProx = sharedPrefix(best.filePath); |
no outgoing calls
no test coverage detected