diff options
Diffstat (limited to 'cli/state.rs')
-rw-r--r-- | cli/state.rs | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/cli/state.rs b/cli/state.rs index d7681fc79..9a8b1cab2 100644 --- a/cli/state.rs +++ b/cli/state.rs @@ -311,8 +311,7 @@ impl ThreadSafeState { } #[cfg(test)] - pub fn mock() -> ThreadSafeState { - let argv = vec![String::from("./deno"), String::from("hello.js")]; + pub fn mock(argv: Vec<String>) -> ThreadSafeState { ThreadSafeState::new( flags::DenoFlags::default(), argv, @@ -349,5 +348,8 @@ impl ThreadSafeState { #[test] fn thread_safe() { fn f<S: Send + Sync>(_: S) {} - f(ThreadSafeState::mock()); + f(ThreadSafeState::mock(vec![ + String::from("./deno"), + String::from("hello.js"), + ])); } |