diff options
author | David Sherret <dsherret@users.noreply.github.com> | 2022-06-20 11:20:52 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-06-20 11:20:52 -0400 |
commit | a7a64438e2cb054700cb35936c941b7444b8bd2d (patch) | |
tree | 3e6794d39e6be0edd044b9c606812b52eeb22097 /cli/tests/integration/run_tests.rs | |
parent | a0fc43c2c51e1a8a9a618c51c2edbbb0104b9810 (diff) |
fix: do not panic running .d.cts and .d.mts files (#14917)
Diffstat (limited to 'cli/tests/integration/run_tests.rs')
-rw-r--r-- | cli/tests/integration/run_tests.rs | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/cli/tests/integration/run_tests.rs b/cli/tests/integration/run_tests.rs index 2ba22d748..fb0d6313b 100644 --- a/cli/tests/integration/run_tests.rs +++ b/cli/tests/integration/run_tests.rs @@ -2709,3 +2709,22 @@ itest!(custom_inspect_url { args: "run custom_inspect_url.js", output: "custom_inspect_url.js.out", }); + +#[test] +fn running_declaration_files() { + let temp_dir = TempDir::new(); + let files = vec!["file.d.ts", "file.d.cts", "file.d.mts"]; + + for file in files { + temp_dir.write(file, ""); + let mut deno_cmd = util::deno_cmd_with_deno_dir(&temp_dir); + let output = deno_cmd + .current_dir(temp_dir.path()) + .args(["run", file]) + .spawn() + .unwrap() + .wait_with_output() + .unwrap(); + assert!(output.status.success()); + } +} |