Define empty theme for tests regardless of cargo features (#2485)

This fixes some errors that were happening when running a single crate's
tests, if the test did not enable the `test-support` feature in the
`theme` crate.
This commit is contained in:
Max Brunsfeld 2023-05-18 09:14:46 -07:00 committed by GitHub
commit 83f8981308
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 1 additions and 2 deletions

View file

@ -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

View file

@ -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"))]

View file

@ -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(), || {