(rel: string, body: string)
| 31 | beforeAll(async () => { |
| 32 | dir = fs.mkdtempSync(path.join(os.tmpdir(), 'codegraph-affected-conv-')); |
| 33 | const w = (rel: string, body: string) => { |
| 34 | fs.mkdirSync(path.dirname(path.join(dir, rel)), { recursive: true }); |
| 35 | fs.writeFileSync(path.join(dir, rel), body); |
| 36 | }; |
| 37 | w('go.mod', 'module example.com/demo\n\ngo 1.22\n'); |
| 38 | w('math.go', 'package demo\n\nfunc Add(a, b int) int { return a + b }\n'); |
| 39 | w('math_test.go', 'package demo\n\nimport "testing"\n\nfunc TestAdd(t *testing.T) { if Add(1, 2) != 3 { t.Fatal("boom") } }\n'); |
no test coverage detected