summaryrefslogtreecommitdiff
path: root/tests/node_compat
diff options
context:
space:
mode:
authorBartek IwaƄczuk <biwanczuk@gmail.com>2024-04-19 00:42:18 +0100
committerGitHub <noreply@github.com>2024-04-19 01:42:18 +0200
commit9e4ba982dfc99eb933a71fec1808c0d6ac7e00b3 (patch)
tree461df5c680921687304bd6d01f7c2e428a17dafa /tests/node_compat
parent7b02f2aba63269e1870985fd6b98c3129270706e (diff)
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
Diffstat (limited to 'tests/node_compat')
-rw-r--r--tests/node_compat/test_runner.rs5
1 files changed, 4 insertions, 1 deletions
diff --git a/tests/node_compat/test_runner.rs b/tests/node_compat/test_runner.rs
index e17c2b373..759dd5d3e 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");