test: use default dark theme, not real system theme

This commit is contained in:
Adil Hanney 2026-04-01 18:01:16 +01:00 committed by Michael Murphy
parent 9a72fe6c2d
commit c33455e9ad
2 changed files with 15 additions and 12 deletions

View file

@ -94,6 +94,9 @@ impl Theme {
let complementary_colors = {
let dark = if self.is_dark {
self.clone()
} else if cfg!(test) {
// For reproducible results in tests, use the default dark theme
Theme::dark_default()
} else {
Theme::dark_config()
.ok()