(p: string)
| 2726 | function pickClosestJvmCandidate(candidates: Node[], fromPath: string): Node { |
| 2727 | const fromDirs = fromPath.split('/').slice(0, -1); |
| 2728 | const sharedPrefix = (p: string): number => { |
| 2729 | const d = p.split('/').slice(0, -1); |
| 2730 | let shared = 0; |
| 2731 | for (let i = 0; i < Math.min(fromDirs.length, d.length); i++) { |
| 2732 | if (fromDirs[i] === d[i]) shared++; |
| 2733 | else break; |
| 2734 | } |
| 2735 | return shared; |
| 2736 | }; |
| 2737 | const isExpect = (n: Node): boolean => Array.isArray(n.decorators) && n.decorators.includes('expect'); |
| 2738 | let best = candidates[0]!; |
| 2739 | let bestProx = sharedPrefix(best.filePath); |
no outgoing calls
no test coverage detected