Add --match-tests to 'check' cmd
For running only tests matching a certain pattern. Useful when doing TDD.
This commit is contained in:
@@ -10,13 +10,18 @@ pub struct Args {
|
||||
/// Skip tests; run only the type-checker
|
||||
#[clap(short, long)]
|
||||
skip_tests: bool,
|
||||
|
||||
/// Only run tests if their path + name match the given string
|
||||
#[clap(short, long)]
|
||||
match_tests: Option<String>,
|
||||
}
|
||||
|
||||
pub fn exec(
|
||||
Args {
|
||||
directory,
|
||||
skip_tests,
|
||||
match_tests,
|
||||
}: Args,
|
||||
) -> miette::Result<()> {
|
||||
crate::with_project(directory, |p| p.check(skip_tests))
|
||||
crate::with_project(directory, |p| p.check(skip_tests, match_tests.clone()))
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user