summaryrefslogtreecommitdiff
path: root/test_util/src/fs.rs
diff options
context:
space:
mode:
authorDavid Sherret <dsherret@users.noreply.github.com>2023-08-01 20:49:09 -0400
committerGitHub <noreply@github.com>2023-08-02 00:49:09 +0000
commit1cefa831fd74b14121494045a347024502d74e34 (patch)
treecc7791cf674e427fe4165262db416e6c537e99a3 /test_util/src/fs.rs
parent36ae37604a0ddab4349df6eb6fafb8ae39fd20fc (diff)
feat(unstable): optional `deno_modules` directory (#19977)
Closes #15633
Diffstat (limited to 'test_util/src/fs.rs')
-rw-r--r--test_util/src/fs.rs4
1 files changed, 4 insertions, 0 deletions
diff --git a/test_util/src/fs.rs b/test_util/src/fs.rs
index 005c467a6..57ab8ee10 100644
--- a/test_util/src/fs.rs
+++ b/test_util/src/fs.rs
@@ -116,6 +116,10 @@ impl PathRef {
serde_json::from_str(&self.read_to_string()).unwrap()
}
+ pub fn read_json_value(&self) -> serde_json::Value {
+ serde_json::from_str(&self.read_to_string()).unwrap()
+ }
+
pub fn rename(&self, to: impl AsRef<Path>) {
fs::rename(self, self.join(to)).unwrap();
}