diff options
Diffstat (limited to 'runtime/js.rs')
-rw-r--r-- | runtime/js.rs | 29 |
1 files changed, 17 insertions, 12 deletions
diff --git a/runtime/js.rs b/runtime/js.rs index ebccaeba6..d61572b21 100644 --- a/runtime/js.rs +++ b/runtime/js.rs @@ -11,21 +11,26 @@ pub fn deno_isolate_init() -> Snapshot { Snapshot::Static(data) } -#[test] -fn cli_snapshot() { - let mut js_runtime = deno_core::JsRuntime::new(deno_core::RuntimeOptions { - startup_snapshot: Some(deno_isolate_init()), - ..Default::default() - }); - js_runtime - .execute( - "<anon>", - r#" +#[cfg(test)] +mod tests { + use super::*; + + #[test] + fn cli_snapshot() { + let mut js_runtime = deno_core::JsRuntime::new(deno_core::RuntimeOptions { + startup_snapshot: Some(deno_isolate_init()), + ..Default::default() + }); + js_runtime + .execute( + "<anon>", + r#" if (!(bootstrap.mainRuntime && bootstrap.workerRuntime)) { throw Error("bad"); } console.log("we have console.log!!!"); "#, - ) - .unwrap(); + ) + .unwrap(); + } } |