@@ -51,9 +51,6 @@ pub struct Runtime {
5151 // This is required to support `run: "onType"` configuration
5252 #[ cfg( feature = "language_server" ) ]
5353 source_text_cache : FxHashMap < Arc < OsStr > , String > ,
54-
55- #[ cfg( test) ]
56- pub ( super ) test_source : std:: sync:: RwLock < Option < String > > ,
5754}
5855
5956/// Output of `Runtime::process_path`
@@ -184,12 +181,9 @@ impl Runtime {
184181 file_system : Box :: new ( OsFileSystem ) ,
185182 #[ cfg( feature = "language_server" ) ]
186183 source_text_cache : FxHashMap :: default ( ) ,
187- #[ cfg( test) ]
188- test_source : std:: sync:: RwLock :: new ( None ) ,
189184 }
190185 }
191186
192- #[ expect( dead_code) ]
193187 pub fn with_file_system (
194188 mut self ,
195189 file_system : Box < dyn RuntimeFileSystem + Sync + Send > ,
@@ -236,13 +230,6 @@ impl Runtime {
236230 }
237231 let source_type = source_type. unwrap_or_default ( ) ;
238232
239- #[ cfg( test) ]
240- if let ( true , Some ( test_source) ) =
241- ( self . paths . contains ( path. as_os_str ( ) ) , & * self . test_source . read ( ) . unwrap ( ) )
242- {
243- return Some ( Ok ( ( source_type, test_source. clone ( ) ) ) ) ;
244- }
245-
246233 // The language server uses more up to date source_text provided by `workspace/didChange` request.
247234 // This is required to support `run: "onType"` configuration
248235 #[ cfg( feature = "language_server" ) ]
@@ -697,15 +684,12 @@ impl Runtime {
697684 pub ( super ) fn run_test_source < ' a > (
698685 & mut self ,
699686 allocator : & ' a Allocator ,
700- source_text : & str ,
701687 check_syntax_errors : bool ,
702688 tx_error : & DiagnosticSender ,
703689 ) -> Vec < Message < ' a > > {
704690 use oxc_allocator:: CloneIn ;
705691 use std:: sync:: Mutex ;
706692
707- * self . test_source . write ( ) . unwrap ( ) = Some ( source_text. to_owned ( ) ) ;
708-
709693 let messages = Mutex :: new ( Vec :: < Message < ' a > > :: new ( ) ) ;
710694 rayon:: scope ( |scope| {
711695 self . resolve_modules ( scope, check_syntax_errors, tx_error, |me, mut module| {
0 commit comments