Skip to content

Commit 17a0170

Browse files
fix: rename misleading test to match actual behavior
Test was named "handles non-numeric thresholds gracefully" but only validated baseline exceeds/aboveWarn with valid thresholds. Actual non-numeric threshold tests exist separately. Renamed to "produces correct exceeds and aboveWarn with valid thresholds".
1 parent fe78641 commit 17a0170

1 file changed

Lines changed: 1 addition & 7 deletions

File tree

tests/integration/complexity.test.js

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -242,13 +242,7 @@ describe('complexityData', () => {
242242
expect(data.functions.length).toBe(0);
243243
});
244244

245-
test('handles non-numeric thresholds gracefully', () => {
246-
// Patch config to inject non-numeric thresholds via opts override
247-
// complexityData reads thresholds from config, so we test by calling
248-
// with aboveThreshold=true and verifying correct behavior even when
249-
// the underlying config could have bad values.
250-
// Here we verify that the baseline with valid thresholds still
251-
// produces correct exceeds and summary.aboveWarn values.
245+
test('produces correct exceeds and aboveWarn with valid thresholds', () => {
252246
const data = complexityData(dbPath);
253247
expect(data.summary.aboveWarn).toBeGreaterThan(0);
254248
const handleReq = data.functions.find((f) => f.name === 'handleRequest');

0 commit comments

Comments
 (0)