Skip to content

Commit 85bfbc9

Browse files
committed
Pass environment
1 parent 8ae8fe1 commit 85bfbc9

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

turbopack/crates/turbopack/tests/node-file-trace.rs

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -337,14 +337,15 @@ async fn node_file_trace_operation(
337337
let output_dir = output_fs.root().to_resolved().await?;
338338

339339
let source = FileSource::new(input);
340+
let environment = Environment::new(ExecutionEnvironment::NodeJsLambda(
341+
NodeJsEnvironment::default().resolved_cell(),
342+
));
340343
let module_asset_context = ModuleAssetContext::new(
341344
Default::default(),
342345
// TODO It's easy to make a mistake here as this should match the config in the
343346
// binary. TODO These test cases should move into the
344347
// `node-file-trace` crate and use the same config.
345-
CompileTimeInfo::new(Environment::new(ExecutionEnvironment::NodeJsLambda(
346-
NodeJsEnvironment::default().resolved_cell(),
347-
))),
348+
CompileTimeInfo::new(environment),
348349
ModuleOptionsContext {
349350
ecmascript: EcmascriptOptionsContext {
350351
enable_types: true,
@@ -354,6 +355,7 @@ async fn node_file_trace_operation(
354355
enable_raw_css: true,
355356
..Default::default()
356357
},
358+
environment: Some(environment.to_resolved().await?),
357359
..Default::default()
358360
}
359361
.cell(),

0 commit comments

Comments
 (0)