Skip to content

Commit

Permalink
fix(cli): migration tests
Browse files Browse the repository at this point in the history
  • Loading branch information
lucasfernog committed Sep 4, 2023
1 parent 41067ce commit c06146b
Showing 1 changed file with 14 additions and 1 deletion.
15 changes: 14 additions & 1 deletion tooling/cli/src/migrate/manifest.rs
Original file line number Diff line number Diff line change
Expand Up @@ -225,6 +225,7 @@ mod tests {
.as_array()
.expect("features must be an array")
.clone();

if toml.contains("reqwest-native-tls-vendored") {
assert!(
features
Expand All @@ -233,10 +234,22 @@ mod tests {
"reqwest-native-tls-vendored was not replaced with native-tls-vendored"
);
}

if toml.contains("system-tray") {
assert!(
features
.iter()
.any(|f| f.as_str().expect("feature must be a string") == "tray-icon"),
"system-tray was not replaced with tray-icon"
);
}

for feature in features.iter() {
let feature = feature.as_str().expect("feature must be a string");
assert!(
keep_features.contains(&feature) || feature == "native-tls-vendored",
keep_features.contains(&feature)
|| feature == "native-tls-vendored"
|| feature == "tray-icon",
"feature {feature} should have been removed"
);
}
Expand Down

0 comments on commit c06146b

Please sign in to comment.