Cover the mutation sites the suite never reached.

git status can fail after rev-parse succeeds, and that empty-stderr
message was never executed. A non-numeric LCOV branch count never
reaches the hit check, so the dead handler is gone and the record
ignores it. JaCoCo's missing counter field and the Go report paths
were split onto lines the coverage report records. A callback stored
in a binding or passed to new stays inside its function, and an npm
coverage script does not install Vitest. mutator --mutate-all on the
changed Python files: 709 killed, 0 survived, 0 uncovered.

Co-authored-by: Robert C. Martin <[email protected]>
This commit is contained in:
Cursor Agent
2026-11-26 00:11:55 +00:00
co-authored by Robert C. Martin
parent c0ba1e13ba
commit 8e491a636a
5 changed files with 67 additions and 12 deletions
+14
View File
@@ -69,6 +69,20 @@ export function text() {
]
def test_a_callback_outside_a_call_stays_inside_its_function():
source = """
export function outer(flag: boolean) {
const local = (n: number) => (n > 0 ? 1 : 0);
if (flag) return new Handler((req) => (req.ok ? 1 : 0));
return 0;
}
"""
functions = functions_in_source(source, "src/demo/box.ts", "/proj")
assert [(fn.namespace, fn.name, fn.complexity) for fn in functions] == [
("demo.box", "outer", 4)
]
def test_express_handlers_are_entries_and_leave_the_parent():
source = """
export function mount(app) {