fix(cli): count skipped tests correctly
This commit is contained in:
parent
8de3a2ee13
commit
f279d10aa2
1 changed files with 2 additions and 4 deletions
|
|
@ -362,6 +362,7 @@ fn run_tests(
|
|||
opts.test_num,
|
||||
paint(opts.color.then_some(AnsiColor::Yellow), &name),
|
||||
);
|
||||
opts.test_num += 1;
|
||||
return Ok(true);
|
||||
}
|
||||
|
||||
|
|
@ -371,6 +372,7 @@ fn run_tests(
|
|||
opts.test_num,
|
||||
paint(opts.color.then_some(AnsiColor::Magenta), &name),
|
||||
);
|
||||
opts.test_num += 1;
|
||||
return Ok(true);
|
||||
}
|
||||
|
||||
|
|
@ -529,7 +531,6 @@ fn run_tests(
|
|||
let mut advance_counter = opts.test_num;
|
||||
let failure_count = failures.len();
|
||||
let mut has_printed = false;
|
||||
let mut skipped_tests = 0;
|
||||
|
||||
let matches_filter = |name: &str, opts: &TestOptions| {
|
||||
if let Some(include) = &opts.include {
|
||||
|
|
@ -576,7 +577,6 @@ fn run_tests(
|
|||
));
|
||||
|
||||
opts.test_num += 1;
|
||||
skipped_tests += 1;
|
||||
|
||||
continue;
|
||||
}
|
||||
|
|
@ -600,8 +600,6 @@ fn run_tests(
|
|||
}
|
||||
}
|
||||
|
||||
opts.test_num += skipped_tests;
|
||||
|
||||
if let Some(file_path) = file_path {
|
||||
if opts.update && failures.len() - failure_count > 0 {
|
||||
write_tests(&file_path, corrected_entries)?;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue