Skip to content

Commit

Permalink
testing: fix double peek view when using next/previous test failures (m…
Browse files Browse the repository at this point in the history
…icrosoft#232454)

Rationalize some of the logic with the way we display things now

Fixes microsoft#226727
  • Loading branch information
connor4312 authored Oct 29, 2024
1 parent 9de080f commit da01009
Showing 1 changed file with 10 additions and 5 deletions.
15 changes: 10 additions & 5 deletions src/vs/workbench/contrib/testing/browser/testingOutputPeek.ts
Original file line number Diff line number Diff line change
Expand Up @@ -74,11 +74,16 @@ import { IViewsService } from '../../../services/views/common/viewsService.js';


/** Iterates through every message in every result */
function* allMessages(results: readonly ITestResult[]) {
for (const result of results) {
for (const test of result.tests) {
for (let taskIndex = 0; taskIndex < test.tasks.length; taskIndex++) {
for (let messageIndex = 0; messageIndex < test.tasks[taskIndex].messages.length; messageIndex++) {
function* allMessages([result]: readonly ITestResult[]) {
if (!result) {
return;
}

for (const test of result.tests) {
for (let taskIndex = 0; taskIndex < test.tasks.length; taskIndex++) {
const messages = test.tasks[taskIndex].messages;
for (let messageIndex = 0; messageIndex < messages.length; messageIndex++) {
if (messages[messageIndex].type === TestMessageType.Error) {
yield { result, test, taskIndex, messageIndex };
}
}
Expand Down

0 comments on commit da01009

Please sign in to comment.