(rel: string, content: string)
| 355 | it('moves the link between the promoted method and the struct\'s own', async () => { |
| 356 | dir = fs.mkdtempSync(path.join(os.tmpdir(), 'cg-go-promoted-sync-')); |
| 357 | const write = (rel: string, content: string) => { |
| 358 | fs.mkdirSync(path.dirname(path.join(dir, rel)), { recursive: true }); |
| 359 | fs.writeFileSync(path.join(dir, rel), content); |
| 360 | }; |
| 361 | const wrap = 'package wrap\n\nimport "example.com/app/base"\n\ntype Wrapper struct {\n\tbase.Base\n}\n\nfunc (Wrapper) Name() string { return "" }\n'; |
| 362 | write('go.mod', 'module example.com/app\n\ngo 1.22\n'); |
| 363 | write('api/api.go', 'package api\n\ntype NamedCloser interface {\n\tClose() error\n\tName() string\n}\n'); |
no test coverage detected