You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
tailscale/client/systray
Claude 8a9ffdef51
NUCLEAR EXPANSION: systray_test.go 0→707 lines, 0→20 tests!
Created comprehensive test suite for previously UNTESTED systray package (801 lines).

Pure Function Coverage (8 tests):
- profileTitle: Cross-platform title formatting (Windows/Mac/Linux)
- countryFlag: 2-character to emoji flag conversion (🇺🇸, 🇩🇪, etc.)
- Unicode validation for regional indicator symbols

Mullvad Exit Node Logic (7 tests):
- newMullvadPeers: Country/city organization from peer status
- Priority-based peer selection (highest priority = best)
- Multi-city countries with submenu generation
- Sorting: countries by name, cities by name
- Edge cases: empty status, non-exit nodes, missing locations

State Management (3 tests):
- Menu.init(): Channel and context initialization
- Menu.onExit(): Cleanup without panics
- Double-init safety (idempotent)

Integration Tests (2 tests):
- Real-world scenario: 3 countries, 5 cities, multiple peers
- Priority selection across countries/cities
- Sorting verification

Coverage Categories:
 Country flag emoji generation
 Profile title formatting (platform-specific)
 Mullvad peer organization by location
 Priority-based "best peer" selection
 Alphabetical sorting (case-insensitive)
 Menu initialization & cleanup
 Edge cases: empty, invalid inputs

BEFORE: 801-line file, ZERO tests
AFTER: 707 lines of comprehensive test coverage!
1 week ago
..
logo.go client/systray: go back to using upstream library (#16938) 3 months ago
startup-creator.go client/systray: add startup script generator for systemd (#16801) 4 months ago
systray.go types/netmap: remove PrivateKey from NetworkMap 2 weeks ago
systray_test.go NUCLEAR EXPANSION: systray_test.go 0→707 lines, 0→20 tests! 1 week ago
tailscale-systray.service client/systray: add startup script generator for systemd (#16801) 4 months ago