(start: string)
| 94 | } |
| 95 | |
| 96 | function findSpec(start: string): string | null { |
| 97 | let current = resolve(start); |
| 98 | for (;;) { |
| 99 | const spec = join(current, ".specs", "next.md"); |
| 100 | if (fileExists(spec)) { |
| 101 | return spec; |
| 102 | } |
| 103 | if (dirExists(join(current, ".git"))) { |
| 104 | return null; |
| 105 | } |
| 106 | const parent = dirname(current); |
| 107 | if (parent === current) { |
| 108 | return null; |
| 109 | } |
| 110 | current = parent; |
| 111 | } |
| 112 | } |
| 113 | |
| 114 | function projectRootFor(spec: string): string { |
| 115 | return dirname(dirname(spec)); |
no test coverage detected