Define empty theme for tests regardless of cargo features

Max Brunsfeld and Kirill created

Co-authored-by: Kirill <kirill@zed.dev>

Change summary

crates/file_finder/Cargo.toml        | 1 +
crates/settings/src/settings_file.rs | 1 -
crates/theme/src/theme_registry.rs   | 1 -
3 files changed, 1 insertion(+), 2 deletions(-)

Detailed changes

crates/file_finder/Cargo.toml 🔗

@@ -26,6 +26,7 @@ postage.workspace = true
 gpui = { path = "../gpui", features = ["test-support"] }
 language = { path = "../language", features = ["test-support"] }
 workspace = { path = "../workspace", features = ["test-support"] }
+theme = { path = "../theme", features = ["test-support"] }
 
 serde_json.workspace = true
 ctor.workspace = true

crates/settings/src/settings_file.rs 🔗

@@ -24,7 +24,6 @@ pub fn default_settings() -> Cow<'static, str> {
     }
 }
 
-#[cfg(any(test, feature = "test-support"))]
 pub const EMPTY_THEME_NAME: &'static str = "empty-theme";
 
 #[cfg(any(test, feature = "test-support"))]

crates/theme/src/theme_registry.rs 🔗

@@ -30,7 +30,6 @@ impl ThemeRegistry {
             font_cache,
         });
 
-        #[cfg(any(test, feature = "test-support"))]
         this.themes.lock().insert(
             settings::EMPTY_THEME_NAME.to_string(),
             gpui::fonts::with_font_cache(this.font_cache.clone(), || {