diff options
author | Nayeem Rahman <nayeemrmn99@gmail.com> | 2023-03-25 19:32:11 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-03-25 21:32:11 +0200 |
commit | 8a4865c3790a6eb93d95189e129b3ee98f349b45 (patch) | |
tree | eb7a7f7a32addcfb49e5814d509c244532e38c2f /cli/lsp/testing | |
parent | fe88b53e50034e185246e03be586c470ca4fbf78 (diff) |
feat(test): print pending tests on sigint (#18246)
Diffstat (limited to 'cli/lsp/testing')
-rw-r--r-- | cli/lsp/testing/execution.rs | 24 |
1 files changed, 5 insertions, 19 deletions
diff --git a/cli/lsp/testing/execution.rs b/cli/lsp/testing/execution.rs index ee182c690..44a0729de 100644 --- a/cli/lsp/testing/execution.rs +++ b/cli/lsp/testing/execution.rs @@ -439,9 +439,6 @@ impl TestRun { test::TestStepResult::Failed(_) => { summary.failed_steps += 1; } - test::TestStepResult::Pending(_) => { - summary.pending_steps += 1; - } } reporter.report_step_result( test_steps.get(&id).unwrap(), @@ -449,6 +446,7 @@ impl TestRun { duration, ); } + test::TestEvent::Sigint => {} } } @@ -716,11 +714,10 @@ impl LspTestReporter { test: desc.into(), }) } - test::TestResult::Failed(js_error) => { - let err_string = test::format_test_error(js_error); + test::TestResult::Failed(failure) => { self.progress(lsp_custom::TestRunProgressMessage::Failed { test: desc.into(), - messages: as_test_messages(err_string, false), + messages: as_test_messages(failure.to_string(), false), duration: Some(elapsed as u32), }) } @@ -830,24 +827,13 @@ impl LspTestReporter { test: desc.into(), }) } - test::TestStepResult::Failed(js_error) => { - let messages = if let Some(js_error) = js_error { - let err_string = test::format_test_error(js_error); - as_test_messages(err_string, false) - } else { - vec![] - }; + test::TestStepResult::Failed(failure) => { self.progress(lsp_custom::TestRunProgressMessage::Failed { test: desc.into(), - messages, + messages: as_test_messages(failure.to_string(), false), duration: Some(elapsed as u32), }) } - test::TestStepResult::Pending(_) => { - self.progress(lsp_custom::TestRunProgressMessage::Enqueued { - test: desc.into(), - }) - } } } |