(p: string)
| 2813 | function pickClosestJvmCandidate(candidates: Node[], fromPath: string): Node { |
| 2814 | const fromDirs = fromPath.split('/').slice(0, -1); |
| 2815 | const sharedPrefix = (p: string): number => { |
| 2816 | const d = p.split('/').slice(0, -1); |
| 2817 | let shared = 0; |
| 2818 | for (let i = 0; i < Math.min(fromDirs.length, d.length); i++) { |
| 2819 | if (fromDirs[i] === d[i]) shared++; |
| 2820 | else break; |
| 2821 | } |
| 2822 | return shared; |
| 2823 | }; |
| 2824 | const isExpect = (n: Node): boolean => Array.isArray(n.decorators) && n.decorators.includes('expect'); |
| 2825 | let best = candidates[0]!; |
| 2826 | let bestProx = sharedPrefix(best.filePath); |
no outgoing calls
no test coverage detected