summaryrefslogtreecommitdiff
path: root/tests/node_compat/test_runner.rs
blob: 15749ca7fd0dc2a6a47a2b95b873640d936e684b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.

use test_util as util;
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("-A")
    .arg(util::tests_path().join("node_compat/test.ts"))
    .spawn()
    .expect("failed to spawn script");

  let status = deno.wait().expect("failed to wait for the child process");
  assert_eq!(Some(0), status.code());
  assert!(status.success());
}