From 8b454b560a2db75370a038e2d86bad53bc60006e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bartek=20Iwa=C5=84czuk?= Date: Mon, 25 Mar 2024 15:22:01 +0000 Subject: test: add test for DENO_FUTURE=1 runtime API (#23065) Add a test that asserts that certain symbols are no longer available if running with `DENO_FUTURE=1` env var. Currently only checks `window` global. --- tests/specs/future/runtime_api/__test__.jsonc | 7 +++++++ tests/specs/future/runtime_api/main.js | 1 + tests/specs/future/runtime_api/main.out | 1 + 3 files changed, 9 insertions(+) create mode 100644 tests/specs/future/runtime_api/__test__.jsonc create mode 100644 tests/specs/future/runtime_api/main.js create mode 100644 tests/specs/future/runtime_api/main.out (limited to 'tests') diff --git a/tests/specs/future/runtime_api/__test__.jsonc b/tests/specs/future/runtime_api/__test__.jsonc new file mode 100644 index 000000000..71a724d89 --- /dev/null +++ b/tests/specs/future/runtime_api/__test__.jsonc @@ -0,0 +1,7 @@ +{ + "args": "run main.js", + "output": "main.out", + "envs": { + "DENO_FUTURE": "1" + } +} diff --git a/tests/specs/future/runtime_api/main.js b/tests/specs/future/runtime_api/main.js new file mode 100644 index 000000000..c310467d3 --- /dev/null +++ b/tests/specs/future/runtime_api/main.js @@ -0,0 +1 @@ +console.log("window is", globalThis.window); diff --git a/tests/specs/future/runtime_api/main.out b/tests/specs/future/runtime_api/main.out new file mode 100644 index 000000000..50818f11c --- /dev/null +++ b/tests/specs/future/runtime_api/main.out @@ -0,0 +1 @@ +window is undefined -- cgit v1.2.3