From 9e4ba982dfc99eb933a71fec1808c0d6ac7e00b3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bartek=20Iwa=C5=84czuk?= Date: Fri, 19 Apr 2024 00:42:18 +0100 Subject: [PATCH] test: fix node_compat_test (#23446) It's not clear to me how these tests worked correctly on CI, but they were failing hard locally because of two problems: - missing env var that tests URL for fake npm registry - trying to run a directory that contains native Node.js tests that require a special harness --- tests/node_compat/test_runner.rs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/tests/node_compat/test_runner.rs b/tests/node_compat/test_runner.rs index e17c2b3736..759dd5d3e9 100644 --- a/tests/node_compat/test_runner.rs +++ b/tests/node_compat/test_runner.rs @@ -5,15 +5,18 @@ use util::deno_config_path; #[test] fn node_compat_tests() { + let _server = util::http_server(); + let mut deno = util::deno_cmd() .current_dir(util::root_path()) + .envs(util::env_vars_for_npm_tests()) .arg("test") .arg("--config") .arg(deno_config_path()) .arg("--no-lock") .arg("--unstable") .arg("-A") - .arg(util::tests_path().join("node_compat")) + .arg(util::tests_path().join("node_compat/test.ts")) .spawn() .expect("failed to spawn script");