mirror of
https://github.com/jparkerweb/plan2code.git
synced 2026-11-16 20:45:33 -08:00
Tighten PR Prep and Test after their first runs
AI Assisted
This commit is contained in:
1 parent
ff1c793633
commit
bf23d7eeea
22 files changed
+261
-109
No files matched your search
@@ -135,6 +135,16 @@ test("coverage read --go-func: functions grouped by file, the module path droppe
|
||||
});
|
||||
});
|
||||
|
||||
test("coverage read --go-func: a nested module's files read from its own folder", () => {
|
||||
const dir = tmp("cov-go-nested");
|
||||
write(dir, "go.mod", "module example.com/shop\n\ngo 1.22\n");
|
||||
write(dir, "tools/go.mod", "module example.com/shop/tools\n\ngo 1.22\n");
|
||||
write(dir, "cover.txt", "example.com/shop/tools/gen/gen.go:5:\t\tRun\t\t50.0%\nexample.com/shop/cart/cart.go:3:\t\tAdd\t\t100.0%\n");
|
||||
const r = C(dir, "read", "--go-func", "cover.txt");
|
||||
assert.equal(r.code, 0, r.stderr);
|
||||
assert.deepEqual(r.json.files.map((f) => f.file), ["cart/cart.go", "tools/gen/gen.go"]);
|
||||
});
|
||||
|
||||
test("coverage read: a missing file is exit 3", () => {
|
||||
const dir = tmp("cov-missing");
|
||||
const r = C(dir, "read", "--lcov", "nope.info");
|
||||
|
||||
Reference in new issue
Block a user