Skip to content

Commit

Permalink
fix unnecessary to_resolved calls in test cases (#73501)
Browse files Browse the repository at this point in the history
### What?

These cases cause warnings by the new check.
  • Loading branch information
sokra authored Dec 4, 2024
1 parent 1ddc35d commit b2219d6
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions turbopack/crates/turbopack-tests/tests/execution.rs
Original file line number Diff line number Diff line change
Expand Up @@ -248,7 +248,7 @@ async fn prepare_test(resource: RcStr) -> Result<Vc<PreparedTest>> {
path: path.to_resolved().await?,
project_path: project_path.to_resolved().await?,
tests_path: tests_path.to_resolved().await?,
project_root: project_root.to_resolved().await?,
project_root,
options,
}
.cell())
Expand Down Expand Up @@ -320,7 +320,7 @@ async fn run_test(prepared_test: Vc<PreparedTest>) -> Result<Vc<RunTestResult>>
import_externals: true,
..Default::default()
},
preset_env_versions: Some(env.to_resolved().await?),
preset_env_versions: Some(env),
tree_shaking_mode: options.tree_shaking_mode,
rules: vec![(
ContextCondition::InDirectory("node_modules".into()),
Expand Down
6 changes: 3 additions & 3 deletions turbopack/crates/turbopack-tests/tests/snapshot.rs
Original file line number Diff line number Diff line change
Expand Up @@ -296,7 +296,7 @@ async fn run_test(resource: RcStr) -> Result<Vc<FileSystemPath>> {
css: CssOptionsContext {
..Default::default()
},
preset_env_versions: Some(env.to_resolved().await?),
preset_env_versions: Some(env),
rules: vec![(
ContextCondition::InDirectory("node_modules".into()),
ModuleOptionsContext {
Expand Down Expand Up @@ -357,8 +357,8 @@ async fn run_test(resource: RcStr) -> Result<Vc<FileSystemPath>> {
project_root,
path,
path,
chunk_root_path.to_resolved().await?,
static_root_path.to_resolved().await?,
chunk_root_path,
static_root_path,
env,
options.runtime_type,
)
Expand Down

0 comments on commit b2219d6

Please sign in to comment.