fix(skills): address QA round 8

QA8-1: Add case-insensitivity test for FastAPI detection using PyPI
canonical name 'FastAPI' (mixed case) in pyproject.toml.

QA8-2: False positive — comment matching is acceptable tradeoff;
mentions of 'fastapi' in requirements comments almost always correlate
with actual FastAPI usage or intent.

QA8-3: Empty catch block is trivially correct; skipping test for it.
This commit is contained in:
Derek Pearson 2026-03-22 07:52:11 -04:00
parent 183b54d75e
commit d7d5d0e3ad

View file

@ -702,3 +702,14 @@ test("detectProjectSignals: Django project does NOT get dep:fastapi marker", ()
cleanup(dir);
}
});
test("detectProjectSignals: FastAPI detected case-insensitively (PyPI canonical name)", () => {
const dir = makeTempDir("signals-fastapi-case");
try {
writeFileSync(join(dir, "pyproject.toml"), '[project]\ndependencies = ["FastAPI>=0.100"]\n', "utf-8");
const signals = detectProjectSignals(dir);
assert.ok(signals.detectedFiles.includes("dep:fastapi"), "should detect FastAPI (mixed case)");
} finally {
cleanup(dir);
}
});