Skip to content

Commit

Permalink
test: fix npmrc test case without $ symbols
Browse files Browse the repository at this point in the history
  • Loading branch information
richerfu committed Jul 21, 2023
1 parent 32f8e33 commit ab6b967
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions crates/npmrc/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -213,14 +213,14 @@ mod tests {

#[test]
pub fn should_use_pacquet_home_env_var() {
env::set_var("$PACQUET_HOME", "/hello");
env::set_var("PACQUET_HOME", "/hello");
let value: Npmrc = serde_ini::from_str("").unwrap();
assert_eq!(value.store_dir, PathBuf::from_str("/hello/store").unwrap());
}

#[test]
pub fn should_use_xdg_data_home_env_var() {
env::set_var("$XDG_DATA_HOME", "/hello");
env::set_var("XDG_DATA_HOME", "/hello");
let value: Npmrc = serde_ini::from_str("").unwrap();
assert_eq!(value.store_dir, PathBuf::from_str("/hello/pacquet/store").unwrap());
}
Expand Down

0 comments on commit ab6b967

Please sign in to comment.