diff options
author | David Sherret <dsherret@users.noreply.github.com> | 2023-02-22 22:45:35 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-02-22 22:45:35 -0500 |
commit | b15f9e60a040e2e450e7ca9971a5fc07dbf8b94c (patch) | |
tree | 4290744b0c0a8f8f5d063322a650fdabf2d3150c /test_util | |
parent | cc8e4a00aaf4c4fe959944c7400f2e259f7faae8 (diff) |
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
Diffstat (limited to 'test_util')
-rw-r--r-- | test_util/src/lib.rs | 4 |
1 files changed, 2 insertions, 2 deletions
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() |