Missing edge-case tests for parsePeers and findActiveExitNode #21
Loading…
Add table
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Problem
The test suite (
test/lib.test.js) only exercises happy-path inputs forparsePeersandfindActiveExitNode. There is no coverage for:parsePeers(null),parsePeers(undefined),parsePeers({})TailscaleIPsorHostNamefindActiveExitNode(null)orfindActiveExitNode({})Impact
The helper functions may throw, return surprising values, or produce incorrect output on edge-case inputs that can occur in real
tailscale status --jsonresponses. The current tests give a false sense of completeness.Related: #12, #13, #14, #15, #29 — these core paths currently have no test coverage.
Yes. Very much agree that the current tests are minimally useful. Needs dramatic expansion to cover edge cases and drastically widen coverage, or it should be removed as code maintenance overhead, since it's fairly useless as is.
Worth thinking about which way to go. Probably expansion of tests, but I can see both sides.
Added edge-case tests for parsePeers/findActiveExitNode in test/lib.test.js. Merged to vibes.
Resolved via merge
2cee873. The plugin is confirmed working by @jtmorris. Human code review required before merging to testing.