@@ -18,12 +18,15 @@ use crate::{
1818 config:: { LintConfig , LintPlugins , OxlintEnv , OxlintGlobals , OxlintSettings } ,
1919 disable_directives:: { DisableDirectives , DisableDirectivesBuilder , RuleCommentType } ,
2020 fixer:: { Fix , FixKind , Message , PossibleFixes } ,
21- frameworks:: { self , FrameworkOptions } ,
21+ frameworks:: FrameworkOptions ,
2222 module_record:: ModuleRecord ,
2323 options:: LintOptions ,
2424 rules:: RuleEnum ,
2525} ;
2626
27+ #[ cfg( not( test) ) ]
28+ use crate :: frameworks:: { has_jest_imports, has_vitest_imports, is_jestlike_file} ;
29+
2730use super :: { LintContext , plugin_name_to_prefix} ;
2831
2932/// Stores shared information about a script block being linted.
@@ -491,9 +494,9 @@ impl<'a> ContextHost<'a> {
491494 if self . plugins ( ) . has_test ( ) {
492495 // let mut test_flags = FrameworkFlags::empty();
493496
494- let vitest_like = frameworks :: has_vitest_imports ( self . module_record ( ) ) ;
495- let jest_like = frameworks :: is_jestlike_file ( & self . file_path )
496- || frameworks :: has_jest_imports ( self . module_record ( ) ) ;
497+ let vitest_like = has_vitest_imports ( self . module_record ( ) ) ;
498+ let jest_like =
499+ is_jestlike_file ( & self . file_path ) || has_jest_imports ( self . module_record ( ) ) ;
497500
498501 self . frameworks . set ( FrameworkFlags :: Vitest , vitest_like) ;
499502 self . frameworks . set ( FrameworkFlags :: Jest , jest_like) ;
0 commit comments