summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/integration/run_tests.rs10
-rw-r--r--tests/testdata/run/deno_futures_env.ts3
2 files changed, 13 insertions, 0 deletions
diff --git a/tests/integration/run_tests.rs b/tests/integration/run_tests.rs
index c9508594c..6f108f739 100644
--- a/tests/integration/run_tests.rs
+++ b/tests/integration/run_tests.rs
@@ -1711,6 +1711,16 @@ fn type_directives_js_main() {
assert_not_contains!(output.combined_output(), "type_reference.d.ts");
}
+#[test]
+fn test_deno_futures_env() {
+ let context = TestContextBuilder::new().add_future_env_vars().build();
+ let output = context
+ .new_command()
+ .args("run --quiet --reload run/deno_futures_env.ts")
+ .run();
+ output.assert_exit_code(0);
+}
+
itest!(type_directives_redirect {
args: "run --reload --check run/type_directives_redirect.ts",
output: "run/type_directives_redirect.ts.out",
diff --git a/tests/testdata/run/deno_futures_env.ts b/tests/testdata/run/deno_futures_env.ts
new file mode 100644
index 000000000..21f76e367
--- /dev/null
+++ b/tests/testdata/run/deno_futures_env.ts
@@ -0,0 +1,3 @@
+if (typeof window !== "undefined") {
+ throw new Error("Window global available");
+}