From b15f9e60a040e2e450e7ca9971a5fc07dbf8b94c Mon Sep 17 00:00:00 2001 From: David Sherret Date: Wed, 22 Feb 2023 22:45:35 -0500 Subject: feat(task): support scripts in package.json (#17887) This is a super basic initial implementation. We don't create a `node_modules/.bin` folder at the moment and add it to the PATH like we should which is necessary to make command name resolution in the subprocess work properly (ex. you run a script that launches another script that then tries to launch an "npx command"... this won't work atm). Closes #17492 --- test_util/src/lib.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'test_util/src') diff --git a/test_util/src/lib.rs b/test_util/src/lib.rs index 25faa1633..4e97fee3b 100644 --- a/test_util/src/lib.rs +++ b/test_util/src/lib.rs @@ -1929,7 +1929,7 @@ pub struct CheckOutputIntegrationTest<'a> { /// the test creates files in the testdata directory (ex. a node_modules folder) pub copy_temp_dir: Option<&'a str>, /// Relative to "testdata" directory - pub maybe_cwd: Option<&'a str>, + pub cwd: Option<&'a str>, } impl<'a> CheckOutputIntegrationTest<'a> { @@ -1970,7 +1970,7 @@ impl<'a> CheckOutputIntegrationTest<'a> { let mut command = deno_cmd_with_deno_dir(&deno_dir); let cwd = if self.temp_cwd { deno_dir.path().to_owned() - } else if let Some(cwd_) = &self.maybe_cwd { + } else if let Some(cwd_) = &self.cwd { testdata_dir.join(cwd_) } else { testdata_dir.clone() -- cgit v1.2.3