Commit Graph

2 Commits

Author SHA1 Message Date
Kpa-clawbot 308b67ed66 chore: remove tautological/vacuous frontend tests (#938)
## Summary

Remove tautological/vacuous frontend tests identified in the test audit
(2026-04-30).

## Deleted Files

- **`test-anim-perf.js`** — Tests local simulation functions, not actual
`live.js` animation code. Behavioral equivalents exist in
`test-live-anims.js`.
- **`test-channel-add-ux.js`** — Pure HTML/CSS substring grep tests
(`src.includes(...)`) with zero behavioral value. Any refactor breaks
them without indicating a real bug.

## Edited Files

- **`test-aging.js`** — Removed `mockGetStatusInfo` (5 tests) and
`getStatusTooltip` (6 tests) blocks. These re-implement SUT logic inside
the test file and assert on the local copy, not the real code. The
GOLD-rated `getNodeStatus` boundary tests (18 assertions) and the BUG
CHECK section are preserved.

## Why

These tests are unfailable by construction — they pass regardless of
whether the code under test is correct. They inflate test counts without
providing regression protection, and they break on harmless refactors
(false negatives).

## Validation

- `npm run test:unit` passes (all 3 files: 62 + 18 + 601 assertions).
- 9 pre-existing failures in `test-frontend-helpers.js` (hop-resolver
affinity tests, unrelated to this change).
- No harness references (`test-all.sh`, `package.json`) needed updating
— deleted files were not listed there.

Co-authored-by: you <you@example.com>
2026-04-30 23:28:30 -07:00
you 3016493089 fix: use last_heard||last_seen for status in nodes table and map
renderRows() in nodes.js and three places in map.js were using only
n.last_seen to compute active/stale status, ignoring the more recent
n.last_heard from in-memory packets. This caused nodes that were recently
heard but had an old DB last_seen to incorrectly show as stale.

Also adds 29 unit tests for the aging system (getNodeStatus,
getStatusInfo, getStatusTooltip, threshold values).
2026-03-23 23:32:01 +00:00