mirror of
https://github.com/fluencelabs/wasm-bindgen
synced 2025-03-28 07:51:07 +00:00
Allow passing extra args to node in test runner
This can be useful for enabling experimental features
This commit is contained in:
parent
7ea3ee60b7
commit
7eb49acf0d
@ -92,9 +92,16 @@ pub fn execute(
|
|||||||
let mut path = env::split_paths(&path).collect::<Vec<_>>();
|
let mut path = env::split_paths(&path).collect::<Vec<_>>();
|
||||||
path.push(env::current_dir().unwrap());
|
path.push(env::current_dir().unwrap());
|
||||||
path.push(tmpdir.to_path_buf());
|
path.push(tmpdir.to_path_buf());
|
||||||
|
let extra_node_args = env::var("NODE_ARGS")
|
||||||
|
.unwrap_or_default()
|
||||||
|
.split(",")
|
||||||
|
.map(|s| s.to_string())
|
||||||
|
.filter(|s| !s.is_empty())
|
||||||
|
.collect::<Vec<_>>();
|
||||||
exec(
|
exec(
|
||||||
Command::new("node")
|
Command::new("node")
|
||||||
.env("NODE_PATH", env::join_paths(&path).unwrap())
|
.env("NODE_PATH", env::join_paths(&path).unwrap())
|
||||||
|
.args(&extra_node_args)
|
||||||
.arg(&js_path)
|
.arg(&js_path)
|
||||||
.args(args),
|
.args(args),
|
||||||
)
|
)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user