summaryrefslogtreecommitdiff
path: root/cli/tests/integration
diff options
context:
space:
mode:
authorBartek IwaƄczuk <biwanczuk@gmail.com>2022-02-11 13:41:56 +0100
committerGitHub <noreply@github.com>2022-02-11 13:41:56 +0100
commit2fa0096821cd04334210fcae6f54f85d304dc17a (patch)
treef4c76302e48861e2d7cf802feab9f3d560fd1c9c /cli/tests/integration
parent2f2c778a074d0eff991c6c22da54429de3de6704 (diff)
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.
Diffstat (limited to 'cli/tests/integration')
-rw-r--r--cli/tests/integration/compat_tests.rs5
1 files changed, 5 insertions, 0 deletions
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(