testing: improve test children API
This changeset results from the discussion in and fixes #126987. Migration for these changes should take about 15-20 minutes. - `createTestItem` no longer takes a parent. Instead, it creates a free- floating test item, which can be added as a child of a parent. - The `TestItem.children` is now a `TestItemCollection`, a set-like interface that also allows replacing items (intelligently diffing them internally) wholesale. This removes the need for the "generation counter" used in samples previously. - There is no longer a `root` on the test controller, but instead an `items` property which is the same `TestItemCollection` - The `tests` in the `TestRunRequest` has been replaced with an `include` property. If undefined, the extension should run all tests. (Since there is no longer a root to reference). Here's some example migrations: - https://github.com/microsoft/vscode-extension-samples/commit/3fad3d66c110107946f827daedd7759cad7c4358 - https://github.com/microsoft/vscode-selfhost-test-provider/commit/3aff74631605dfd4120b98014f54ff744f292fe0
Showing
想要评论请 注册 或 登录