Skip to content

vscode.TestObserver is an unusual API pattern #117379

@jrieken

Description

@jrieken

Testing #117307

So far, my understanding of vscode.TestObserver and its factory functions is that a test observer gives you access to tests, e.g it enumerates them and fires events when something changes. The usual API pattern for something like that doesn't use such an indirection but exposes things directly. So, I wonder why there isn't something like this instead

namespace test {
   const testItems: TestItem[];
   const onDidChangeTestItems: Event<TestItemChangeEvent>
}

Metadata

Metadata

Assignees

Labels

apitestingBuilt-in testing supportunder-discussionIssue is under discussion for relevance, priority, approach

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions