({ result, stderr = "", opts = {}, githubOpts = {} })
| 360 | } |
| 361 | |
| 362 | async function run({ result, stderr = "", opts = {}, githubOpts = {} }) { |
| 363 | const resultText = typeof result === "string" ? result : JSON.stringify(result); |
| 364 | const fs = mockFs(resultText, stderr); |
| 365 | const github = makeGithub(githubOpts); |
| 366 | const core = mockCore(); |
| 367 | const options = Object.assign({ stickySummary: true, incremental: false }, opts); |
| 368 | await runPostReviewComments({ |
| 369 | github, |
| 370 | context, |
| 371 | core, |
| 372 | fs, |
| 373 | resultPath: "/tmp/ocr-result.json", |
| 374 | stderrPath: "/tmp/ocr-stderr.log", |
| 375 | ...options, |
| 376 | }); |
| 377 | return { github, core, outputs: core.outputs }; |
| 378 | } |
| 379 | |
| 380 | // ---- Test cases (mirror PLAN §7) ---- |
| 381 |
no test coverage detected