-
Notifications
You must be signed in to change notification settings - Fork 21
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: a collection of small improvements (#70)
- Loading branch information
Showing
9 changed files
with
55 additions
and
85 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -153,7 +153,7 @@ mod tests { | |
}; | ||
manager.add(&args).await.unwrap(); | ||
|
||
insta::assert_debug_snapshot!(get_all_folders(&dir.path().to_path_buf())); | ||
insta::assert_debug_snapshot!(get_all_folders(dir.path())); | ||
|
||
// Ensure that is-buffer does not have any dependencies | ||
let is_buffer_path = virtual_store_dir.join("[email protected]/node_modules"); | ||
|
@@ -190,7 +190,7 @@ mod tests { | |
}; | ||
manager.add(&args).await.unwrap(); | ||
|
||
insta::assert_debug_snapshot!(get_all_folders(&dir.path().to_path_buf())); | ||
insta::assert_debug_snapshot!(get_all_folders(dir.path())); | ||
|
||
// Make sure the symlinks are correct | ||
assert_eq!( | ||
|
@@ -219,7 +219,7 @@ mod tests { | |
virtual_store_dir: virtual_store_dir.to_string_lossy().to_string(), | ||
}; | ||
manager.add(&args).await.unwrap(); | ||
let file = PackageJson::from_path(&dir.path().join("package.json")).unwrap(); | ||
let file = PackageJson::from_path(dir.path().join("package.json")).unwrap(); | ||
assert!(file.get_dependencies(&[DependencyGroup::Default]).contains_key("is-odd")); | ||
env::set_current_dir(¤t_directory).unwrap(); | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -99,7 +99,7 @@ mod tests { | |
env::set_current_dir(dir.path()).unwrap(); | ||
|
||
let package_json_path = dir.path().join("package.json"); | ||
let mut package_json = PackageJson::create_if_needed(&package_json_path).unwrap(); | ||
let mut package_json = PackageJson::create_if_needed(package_json_path.clone()).unwrap(); | ||
|
||
package_json.add_dependency("is-odd", "3.0.1", DependencyGroup::Default).unwrap(); | ||
package_json | ||
|
@@ -122,7 +122,7 @@ mod tests { | |
assert!(dir.path().join("node_modules/fast-decode-uri-component").is_symlink()); | ||
assert!(dir.path().join("node_modules/.pacquet/[email protected]").is_dir()); | ||
|
||
insta::assert_debug_snapshot!(get_all_folders(&dir.path().to_path_buf())); | ||
insta::assert_debug_snapshot!(get_all_folders(dir.path())); | ||
|
||
env::set_current_dir(¤t_directory).unwrap(); | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
...es/package_json/src/snapshots/pacquet_package_json__tests__init_package_json_content.snap
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters