From 11e9f2eb833d7b9fe2bdf7314c6c32cd8e7a31da Mon Sep 17 00:00:00 2001 From: Lucas Fernandes Nogueira Date: Tue, 1 Oct 2024 20:53:39 -0300 Subject: [PATCH] feat(cli): add clap parse test (#11189) lets us catch runtime errors early on the testing phase - for instance when we add two arguments with the same flag --- crates/tauri-cli/src/lib.rs | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/crates/tauri-cli/src/lib.rs b/crates/tauri-cli/src/lib.rs index 80c7da956..2c5be4802 100644 --- a/crates/tauri-cli/src/lib.rs +++ b/crates/tauri-cli/src/lib.rs @@ -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(); + } +}