use crate::core::{Config, TestRunner};
use anyhow::Result;
use clap::Args;
#[derive(Args, Debug)]
pub struct TestCommand {
pub suite: Option<String>,
}
impl TestCommand {
pub async fn execute(&self, config: &Config) -> Result<()> {
let mut runner = TestRunner::new(config);
let results = if let Some(suite) = &self.suite {
runner.run_suite(suite).await?
} else {
runner.run_all().await?
};
results.print_summary();
Ok(())
}
}