From 36ad4e3b771356d30e0a43b2c43b85e69ce348cc Mon Sep 17 00:00:00 2001 From: Divya Date: Mon, 4 May 2020 06:35:00 -0500 Subject: fix(install): Propagate --unstable flag (#5061) --- cli/flags.rs | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) (limited to 'cli/flags.rs') diff --git a/cli/flags.rs b/cli/flags.rs index 239382e03..decf3cb17 100644 --- a/cli/flags.rs +++ b/cli/flags.rs @@ -2053,6 +2053,30 @@ mod tests { ); } + #[test] + fn install_unstable() { + let r = flags_from_vec_safe(svec![ + "deno", + "install", + "--unstable", + "https://deno.land/std/examples/colors.ts" + ]); + assert_eq!( + r.unwrap(), + Flags { + unstable: true, + subcommand: DenoSubcommand::Install { + name: None, + module_url: "https://deno.land/std/examples/colors.ts".to_string(), + args: svec![], + root: None, + force: false, + }, + ..Flags::default() + } + ); + } + #[test] fn install_with_args() { let r = flags_from_vec_safe(svec![ -- cgit v1.2.3