(suiteName, subjectName, sourcePath)
| 79 | }) |
| 80 | |
| 81 | const measure = (suiteName, subjectName, sourcePath) => { |
| 82 | const tsconfigPath = writeTempTsconfig(suiteName, subjectName, sourcePath) |
| 83 | const result = spawnSync("pnpm", ["exec", "tsc", "-p", tsconfigPath, "--extendedDiagnostics", "--noEmit"], { |
| 84 | cwd: effectDir, |
| 85 | encoding: "utf8" |
| 86 | }) |
| 87 | const output = `${result.stdout ?? ""}${result.stderr ?? ""}` |
| 88 | if (result.error) { |
| 89 | throw result.error |
| 90 | } |
| 91 | if (result.status !== 0) { |
| 92 | process.stderr.write(output) |
| 93 | throw new Error(`Compiler failed for ${suiteName}/${subjectName}`) |
| 94 | } |
| 95 | return readDiagnostics(output, `${suiteName}/${subjectName}`) |
| 96 | } |
| 97 | |
| 98 | const subtractDiagnostics = (total, baseline) => ({ |
| 99 | instantiations: total.instantiations - baseline.instantiations, |
no test coverage detected