From 2fa0096821cd04334210fcae6f54f85d304dc17a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bartek=20Iwa=C5=84czuk?= Date: Fri, 11 Feb 2022 13:41:56 +0100 Subject: compat: support --compat in web workers (#13629) Adds another callback to WebWorkerOptions that allows to execute some modules before actual worker code executes. This allows to set up Node global using std/node. --- cli/tests/integration/compat_tests.rs | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'cli/tests/integration') diff --git a/cli/tests/integration/compat_tests.rs b/cli/tests/integration/compat_tests.rs index bafe24af3..189e1eb41 100644 --- a/cli/tests/integration/compat_tests.rs +++ b/cli/tests/integration/compat_tests.rs @@ -90,6 +90,11 @@ itest!(top_level_fail_esm { output: "compat/test_runner/top_level_fail_esm.out", }); +itest!(compat_worker { + args: "run --compat --unstable -A --quiet --no-check compat/worker/worker_test.mjs", + output: "compat/worker/worker_test.out", +}); + #[test] fn globals_in_repl() { let (out, _err) = util::run_and_collect_output_with_args( -- cgit v1.2.3