Skip to content

Commit

Permalink
test
Browse files Browse the repository at this point in the history
  • Loading branch information
dsherret committed Sep 27, 2024
1 parent 63c539b commit fb8a6c4
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/npm.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1396,4 +1396,11 @@ mod tests {
assert!(!req.matches(&Version::parse_from_npm("0.0.0-pre").unwrap()));
}
}

#[test]
fn test_is_valid_npm_tag() {
assert_eq!(is_valid_npm_tag("latest"), true);
assert_eq!(is_valid_npm_tag(""), false);
assert_eq!(is_valid_npm_tag("SD&*($#&%*(#*$%"), false);
}
}

0 comments on commit fb8a6c4

Please sign in to comment.