Skip to content

Commit

Permalink
feat(cli): add clap parse test (#11189)
Browse files Browse the repository at this point in the history
lets us catch runtime errors early on the testing phase - for instance when we add two arguments with the same flag
  • Loading branch information
lucasfernog authored Oct 1, 2024
1 parent f5d6182 commit 11e9f2e
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions crates/tauri-cli/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -376,3 +376,15 @@ impl CommandExt for Command {
}
}
}

#[cfg(test)]
mod tests {
use clap::CommandFactory;

use crate::Cli;

#[test]
fn verify_cli() {
Cli::command().debug_assert();
}
}

0 comments on commit 11e9f2e

Please sign in to comment.