From 22a834ff5b4b312b8f91be8991f2b495d49fad2f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bartek=20Iwa=C5=84czuk?= Date: Wed, 14 Aug 2024 21:50:06 +0100 Subject: test: run unit tests with DENO_FUTURE=1 (#24400) This commit adds another test suite that runs all Deno unit tests with `DENO_FUTURE=1` flag to ensure all APIs are working as expected, once Deno 2 is released. --------- Co-authored-by: Divy Srivastava --- tests/integration/js_unit_tests.rs | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'tests/integration/js_unit_tests.rs') diff --git a/tests/integration/js_unit_tests.rs b/tests/integration/js_unit_tests.rs index cbae4a0b8..bc6c5bdae 100644 --- a/tests/integration/js_unit_tests.rs +++ b/tests/integration/js_unit_tests.rs @@ -117,6 +117,10 @@ util::unit_test_factory!( ); fn js_unit_test(test: String) { + js_unit_test_inner(test, false); +} + +pub fn js_unit_test_inner(test: String, future: bool) { let _g = util::http_server(); let deno = util::deno_cmd() @@ -129,6 +133,12 @@ fn js_unit_test(test: String) { .arg("--location=http://127.0.0.1:4545/") .arg("--no-prompt"); + let deno = if future { + deno.env("DENO_FUTURE", "1") + } else { + deno + }; + // TODO(mmastrac): it would be better to just load a test CA for all tests let deno = if test == "websocket_test" || test == "tls_sni_test" { deno.arg("--unsafely-ignore-certificate-errors") -- cgit v1.2.3