Volleyball Elite Academy development update
|
Volleyball Elite Academy
Test that the colour mapping helper is correct in isolation
|
Test that the colour mapping helper is correct in isolationVolleyball Elite Academy — Development Update • June 6, 2026
--- title: Test that the colour mapping helper is correct in isolation ---
Test that the colour mapping helper is correct in isolation
## What & Why The hex->HSL conversion (hexToHslChannels) and the readable-foreground picker (readableForegroundChannels) in client/src/lib/branding-theme are the core of every branding preview and the live-site theme. They are currently only exercised indirectly through the UI. A fast unit test pinning their exact output for known hex inputs (including 3-digit hex, black, white, and a mid-tone) would catch regressions immediately without a browser.
## Done looks like - A Vitest unit test covers hexToHslChannels and readableForegroundChannels with several known inputs and expected channel strings, including edge cases (3-digit shorthand, pure black/white, invalid hex returning null). - Runs under the existing vitest.config.
## Relevant files - -
|
Volleyball Elite Academy Reply to this email — we read every reply. You received this because you have an account with Volleyball Elite Academy. elitevolleyball.training |
|
No comments:
Post a Comment