File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -241,9 +241,11 @@ mod tests {
241241 let project = project_with_npmrc (
242242 "registry=https://default.example/\n @yarnpkg:registry=https://yarn.example/\n " ,
243243 ) ;
244- let config = NpmConfig :: load_for_project ( Some ( project. path ( ) . to_path_buf ( ) ) ) ;
245- assert_eq ! ( config. registry_for_package( "" ) , "https://default.example" ) ;
246- assert_eq ! ( config. registry_for_package( "@yarnpkg/cli-dist" ) , "https://yarn.example" ) ;
244+ EnvConfig :: with_vars ( std:: iter:: empty :: < ( & ' static str , & ' static str ) > ( ) , |_| {
245+ let config = NpmConfig :: load_for_project ( Some ( project. path ( ) . to_path_buf ( ) ) ) ;
246+ assert_eq ! ( config. registry_for_package( "" ) , "https://default.example" ) ;
247+ assert_eq ! ( config. registry_for_package( "@yarnpkg/cli-dist" ) , "https://yarn.example" ) ;
248+ } ) ;
247249 }
248250
249251 #[ test]
You can’t perform that action at this time.
0 commit comments