From 4c2380af5c8561fc0a5f8279c1c7336680d026ed Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bartek=20Iwa=C5=84czuk?= Date: Thu, 16 Feb 2023 14:30:14 +0100 Subject: test: add unit tests from std/node (#17794) Adds two test files: "cli/tests/unit_node/process_test.ts" and "cli/tests/unit_node/child_process_test.ts" --------- Co-authored-by: Yoshiya Hinosawa --- cli/tests/integration/node_unit_tests.rs | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 cli/tests/integration/node_unit_tests.rs (limited to 'cli/tests/integration/node_unit_tests.rs') diff --git a/cli/tests/integration/node_unit_tests.rs b/cli/tests/integration/node_unit_tests.rs new file mode 100644 index 000000000..d29d988ba --- /dev/null +++ b/cli/tests/integration/node_unit_tests.rs @@ -0,0 +1,21 @@ +// Copyright 2018-2023 the Deno authors. All rights reserved. MIT license. + +use test_util as util; + +#[test] +fn node_unit_tests() { + let _g = util::http_server(); + + let mut deno = util::deno_cmd() + .current_dir(util::root_path()) + .arg("test") + .arg("--unstable") + .arg("-A") + .arg(util::tests_path().join("unit_node")) + .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()); +} -- cgit v1.2.3