Make `SyntaxTheme::new_test` only available in tests (#11909)

Marshall Bowers created

This PR addresses a TODO comment by making `SyntaxTheme::new_test` only
available in tests.

We needed to make it available when the `test-support` feature was
enabled for it to be used in tests outside of the `theme` crate.

Release Notes:

- N/A

Change summary

crates/theme/src/styles/syntax.rs | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

Detailed changes

crates/theme/src/styles/syntax.rs 🔗

@@ -127,7 +127,7 @@ impl SyntaxTheme {
         }
     }
 
-    // TODO: Get this working with `#[cfg(test)]`. Why isn't it?
+    #[cfg(any(test, feature = "test-support"))]
     pub fn new_test(colors: impl IntoIterator<Item = (&'static str, Hsla)>) -> Self {
         SyntaxTheme {
             highlights: colors