Skip to content

Commit 18a0cfa

Browse files
committed
fix: use correct serde rename key in mappings config test
The test used "quit" but the field is renamed to "app::quit". On macOS the test passed coincidentally because the default Platform variant's mac value matched, but on Linux CI it failed with "ctrl+q".
1 parent b7810b7 commit 18a0cfa

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src-tauri/src/config.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1263,11 +1263,12 @@ mod tests {
12631263
#[test]
12641264
fn deserializes_from_json() {
12651265
let json = r#"{
1266-
"quit": "cmd+q",
1266+
"app::quit": "cmd+q",
12671267
"app::addProject": { "mac": "cmd+o", "other": "ctrl+o" }
12681268
}"#;
12691269

12701270
let mappings: MappingsConfig = serde_json::from_str(json).unwrap();
1271+
// Universal shortcut returns the string as-is on all platforms
12711272
assert_eq!(mappings.quit.for_current_platform(), "cmd+q");
12721273
}
12731274

0 commit comments

Comments
 (0)