refactor: move inline tests to separate files via #[path]

This commit is contained in:
2026-05-12 16:39:58 +02:00
parent 00218366da
commit 763d622601
58 changed files with 3267 additions and 3267 deletions

View File

@@ -78,21 +78,5 @@ impl Config {
}
#[cfg(test)]
mod tests {
use super::*;
#[test]
fn config_roundtrip() {
let config = Config {
api_url: "http://localhost:3000".into(),
};
let json = serde_json::to_string(&config).unwrap();
let decoded: Config = serde_json::from_str(&json).unwrap();
assert_eq!(decoded.api_url, "http://localhost:3000");
}
#[test]
fn load_returns_none_when_no_file() {
let _ = Config::load();
}
}
#[path = "tests/config.rs"]
mod tests;