Skip to content

Commit

Permalink
[node-js-release-info] add test to verify thread-safe types
Browse files Browse the repository at this point in the history
  • Loading branch information
busticated committed Oct 19, 2023
1 parent 9e93108 commit 371b055
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions crates/node-js-release-info/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -322,6 +322,8 @@ mod tests {
use mockito::{Server, Mock};
use super::*;

fn is_thread_safe<T: Sized + Send + Sync + Unpin>() {}

#[test]
fn it_initializes(){
let info = NodeJSRelInfo::new("1.0.0");
Expand All @@ -332,6 +334,7 @@ mod tests {
assert_eq!(info.filename, "".to_string());
assert_eq!(info.sha256, "".to_string());
assert_eq!(info.url, "".to_string());
is_thread_safe::<NodeJSRelInfo>();
}

#[test]
Expand Down

0 comments on commit 371b055

Please sign in to comment.