Skip to content
Permalink
Browse files

re-enable execute_mod_circular test

  • Loading branch information...
ry committed Mar 12, 2019
1 parent 859093a commit 8eba43a9028668241c538954d47dd2146b8313b8
Showing with 13 additions and 17 deletions.
  1. +13 −17 src/isolate.rs
@@ -217,34 +217,30 @@ mod tests {
assert_eq!(metrics.resolve_count.load(Ordering::SeqCst), 1);
}

/*
TODO(ry) uncomment this before landing
#[test]
fn execute_mod_circular() {
let filename = std::env::current_dir().unwrap().join("tests/circular1.js");
let filename = filename.to_str().unwrap();
let filename = filename.to_str().unwrap().to_string();

let argv = vec![String::from("./deno"), String::from(filename)];
let argv = vec![String::from("./deno"), filename.clone()];
let (flags, rest_argv, _) = flags::set_flags(argv).unwrap();

let state = Arc::new(IsolateState::new(flags, rest_argv, None));
let state_ = state.clone();
let init = IsolateInit {
snapshot: None,
init_script: None,
};
let mut isolate =
Isolate::new(init, state, dispatch_sync, DenoPermissions::default());
tokio_util::init(|| {
isolate
.execute_mod(filename, false)
.expect("execute_mod error");
isolate.event_loop().ok();
});
let metrics = &isolate.state.metrics;
tokio_util::run(lazy(move || {
let cli = Cli::new(init, state.clone(), DenoPermissions::default());
let mut isolate = Isolate::new(cli);
if let Err(err) = isolate.execute_mod(&filename, false) {
eprintln!("execute_mod err {:?}", err);
}
panic_on_error(isolate)
}));

let metrics = &state_.metrics;
assert_eq!(metrics.resolve_count.load(Ordering::SeqCst), 2);
}
*/
}

0 comments on commit 8eba43a

Please sign in to comment.
You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.