Some checks failed
CI / Check / Test (push) Failing after 1m24s
Hex arch + DDD, tree-sitter parsing, Mermaid/ASCII output. Supports Rust + Python. 92 tests. CI, diff, --check for staleness detection.
38 lines
1023 B
Rust
38 lines
1023 B
Rust
use archlens_domain::{AnalysisConfig, DiagramLevel, OutputConfig};
|
|
|
|
#[test]
|
|
fn analysis_config_has_sensible_defaults() {
|
|
let config = AnalysisConfig::default();
|
|
assert!(config.excludes().is_empty());
|
|
assert_eq!(config.level(), DiagramLevel::Module);
|
|
assert!(config.module_mappings().is_empty());
|
|
}
|
|
|
|
#[test]
|
|
fn analysis_config_with_excludes() {
|
|
let config =
|
|
AnalysisConfig::default().with_excludes(vec!["tests/".to_string(), "vendor/".to_string()]);
|
|
|
|
assert_eq!(config.excludes().len(), 2);
|
|
}
|
|
|
|
#[test]
|
|
fn output_config_has_sensible_defaults() {
|
|
let config = OutputConfig::default();
|
|
assert!(!config.split_by_module());
|
|
assert!(config.output_path().is_none());
|
|
}
|
|
|
|
#[test]
|
|
fn output_config_with_split() {
|
|
let config = OutputConfig::default().with_split_by_module(true);
|
|
assert!(config.split_by_module());
|
|
}
|
|
|
|
#[test]
|
|
fn all_diagram_levels_exist() {
|
|
let _project = DiagramLevel::Project;
|
|
let _module = DiagramLevel::Module;
|
|
let _type_level = DiagramLevel::Type;
|
|
}
|