diff options
Diffstat (limited to 'core/modules.rs')
-rw-r--r-- | core/modules.rs | 25 |
1 files changed, 15 insertions, 10 deletions
diff --git a/core/modules.rs b/core/modules.rs index 174dadd2d..353119660 100644 --- a/core/modules.rs +++ b/core/modules.rs @@ -1719,6 +1719,7 @@ mod tests { use super::*; use crate::ascii_str; use crate::JsRuntime; + use crate::JsRuntimeForSnapshot; use crate::RuntimeOptions; use crate::Snapshot; use deno_ops::op; @@ -2889,11 +2890,13 @@ if (import.meta.url != 'file:///main_with_code.js') throw Error(); ); let loader = MockLoader::new(); - let mut runtime = JsRuntime::new(RuntimeOptions { - module_loader: Some(loader), - will_snapshot: true, - ..Default::default() - }); + let mut runtime = JsRuntimeForSnapshot::new( + RuntimeOptions { + module_loader: Some(loader), + ..Default::default() + }, + Default::default(), + ); // In default resolution code should be empty. // Instead we explicitly pass in our own code. // The behavior should be very similar to /a.js. @@ -2931,11 +2934,13 @@ if (import.meta.url != 'file:///main_with_code.js') throw Error(); ); let loader = MockLoader::new(); - let mut runtime = JsRuntime::new(RuntimeOptions { - module_loader: Some(loader), - will_snapshot: true, - ..Default::default() - }); + let mut runtime = JsRuntimeForSnapshot::new( + RuntimeOptions { + module_loader: Some(loader), + ..Default::default() + }, + Default::default(), + ); // In default resolution code should be empty. // Instead we explicitly pass in our own code. // The behavior should be very similar to /a.js. |