chore(tests): test_util - Add PathRef (#19450)

This adds a new `PathRef` struct to test_util for making it easier to
work with paths in test code. I'm going to expand on this more in the
future.
This commit is contained in:
David Sherret 2023-06-10 11:09:45 -04:00 committed by GitHub
parent f3326eebd6
commit 7f15126f23
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
40 changed files with 778 additions and 719 deletions

View file

@ -204,10 +204,10 @@ fn typecheck_core() {
format!(
"import \"{}\";",
deno_core::resolve_path(
util::root_path()
.join("core/lib.deno_core.d.ts")
.to_str()
.unwrap(),
&util::root_path()
.join("core")
.join("lib.deno_core.d.ts")
.to_string(),
&std::env::current_dir().unwrap()
)
.unwrap()
@ -215,7 +215,7 @@ fn typecheck_core() {
)
.unwrap();
let args = vec!["run".to_string(), test_file.to_string_lossy().into_owned()];
let args = vec!["run".to_string(), test_file.to_string()];
let output = context.new_command().args_vec(args).split_output().run();
println!("stdout: {}", output.stdout());