summaryrefslogtreecommitdiff
path: root/cli/tests/integration/run_tests.rs
diff options
context:
space:
mode:
authorCre3per <12541974+Cre3per@users.noreply.github.com>2023-03-22 15:15:53 +0100
committerGitHub <noreply@github.com>2023-03-22 10:15:53 -0400
commitfd0658fb429e659b037cbf8b2a86459ce49cb3b3 (patch)
tree7ffa357ebfb18c5cd655677b5cc29c24089ddaa2 /cli/tests/integration/run_tests.rs
parent50b793c9ed866ee29e8f04b4fa24b485b01a2b74 (diff)
feat(cli): --ext parameter for run, compile, and bundle (#17172)
Adds `--ext` to `deno run`, closes #5088 Additionally - Adds `--ext` to `deno compile` and `deno bundle`
Diffstat (limited to 'cli/tests/integration/run_tests.rs')
-rw-r--r--cli/tests/integration/run_tests.rs24
1 files changed, 24 insertions, 0 deletions
diff --git a/cli/tests/integration/run_tests.rs b/cli/tests/integration/run_tests.rs
index 4c78a5cf5..e4d670935 100644
--- a/cli/tests/integration/run_tests.rs
+++ b/cli/tests/integration/run_tests.rs
@@ -3823,6 +3823,30 @@ itest!(error_cause_recursive {
exit_code: 1,
});
+itest!(default_file_extension_is_js {
+ args: "run --check file_extensions/js_without_extension",
+ output: "file_extensions/js_without_extension.out",
+ exit_code: 0,
+});
+
+itest!(js_without_extension {
+ args: "run --ext js --check file_extensions/js_without_extension",
+ output: "file_extensions/js_without_extension.out",
+ exit_code: 0,
+});
+
+itest!(ts_without_extension {
+ args: "run --ext ts file_extensions/ts_without_extension",
+ output: "file_extensions/ts_without_extension.out",
+ exit_code: 0,
+});
+
+itest!(ext_flag_takes_precedence_over_extension {
+ args: "run --ext ts file_extensions/ts_with_js_extension.js",
+ output: "file_extensions/ts_with_extension.out",
+ exit_code: 0,
+});
+
#[test]
fn websocket() {
let _g = util::http_server();