Skip to content

Commit

Permalink
Support retiring test states
Browse files Browse the repository at this point in the history
  • Loading branch information
hbenl committed Jul 25, 2021
1 parent 4972baa commit 319e4d7
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions src/testConverter.ts
Expand Up @@ -66,6 +66,23 @@ export class TestConverter implements vscode.Disposable {
})
);

if (adapter.retire) {
this.disposables.push(
adapter.retire(evt => {
if (!this.controller) {
return;
}
if (evt.tests) {
for (const id of evt.tests) {
this.itemsById.get(id)?.invalidateResults();
}
} else {
this.controller.items.forEach(item => item.invalidateResults());
}
})
);
}

setTimeout(() => this.adapter.load(), 1);
}

Expand Down

0 comments on commit 319e4d7

Please sign in to comment.