diff options
author | Bartek IwaĆczuk <biwanczuk@gmail.com> | 2024-03-25 15:22:01 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-03-25 16:22:01 +0100 |
commit | 8b454b560a2db75370a038e2d86bad53bc60006e (patch) | |
tree | cae13e8b4e18c1fb9b1d1686cc5b0b14d88239c9 | |
parent | 64e8c36805dab0362ed274a977bb9d0638b55b2a (diff) |
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.
-rw-r--r-- | tests/specs/future/runtime_api/__test__.jsonc | 7 | ||||
-rw-r--r-- | tests/specs/future/runtime_api/main.js | 1 | ||||
-rw-r--r-- | tests/specs/future/runtime_api/main.out | 1 |
3 files changed, 9 insertions, 0 deletions
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 |