Skip to content

Test error doesn't appear when test item expanded #153993

@r3m0t

Description

@r3m0t

Does this issue occur when all extensions are disabled?: N/A

  • VS Code Version: 1.69.0-insider
  • OS Version: Windows 10

Steps to Reproduce:

  1. Build and install from VSIX the test-provider-sample from https://github.com/microsoft/vscode-extension-samples/compare/main...r3m0t:vscode-extension-samples:patch-1?expand=1 - this just sets TestItem.error instead of adding test cases.
  2. File> Open Folder.. and choose the Sample folder https://github.com/r3m0t/vscode-extension-samples/tree/patch-1/test-provider-sample/sample
  3. Open Testing panel and open test2.md
  4. Actual outcome: test2.md shows "expanded arrow" but error message doesn't appear. Error appears in Developer Tools

image

image

bootstrap-window.js:251 [uncaught exception]: TypeError: Cannot read properties of undefined (reading 'expand')
onUnexpectedError @ bootstrap-window.js:251
(anonymous) @ bootstrap-window.js:52
emit @ node:events:390
window.onerror @ node:electron/js2c/renderer_init:73
platform_1.globals.onerror @ errorTelemetry.ts:20
bootstrap-window.js:254 TypeError: Cannot read properties of undefined (reading 'expand')
at Object.getId (vscode-file://vscode-app/c:/Users/ther3/dev/vscode/out/vs/workbench/contrib/testing/browser/explorerProjections/nodeHelper.js:11:57)
at vscode-file://vscode-app/c:/Users/ther3/dev/vscode/out/vs/base/browser/ui/tree/indexTreeModel.js:140:92
at Array.map ()
at IndexTreeModel.spliceSimple (vscode-file://vscode-app/c:/Users/ther3/dev/vscode/out/vs/base/browser/ui/tree/indexTreeModel.js:140:62)
at IndexTreeModel.spliceSmart (vscode-file://vscode-app/c:/Users/ther3/dev/vscode/out/vs/base/browser/ui/tree/indexTreeModel.js:69:29)
at IndexTreeModel.splice (vscode-file://vscode-app/c:/Users/ther3/dev/vscode/out/vs/base/browser/ui/tree/indexTreeModel.js:60:22)
at ObjectTreeModel._setChildren (vscode-file://vscode-app/c:/Users/ther3/dev/vscode/out/vs/base/browser/ui/tree/objectTreeModel.js:66:24)
at ObjectTreeModel.setChildren (vscode-file://vscode-app/c:/Users/ther3/dev/vscode/out/vs/base/browser/ui/tree/objectTreeModel.js:31:18)
at WorkbenchObjectTree.setChildren (vscode-file://vscode-app/c:/Users/ther3/dev/vscode/out/vs/base/browser/ui/tree/objectTree.js:22:24)
at NodeChangeList.applyTo (vscode-file://vscode-app/c:/Users/ther3/dev/vscode/out/vs/workbench/contrib/testing/browser/explorerProjections/nodeHelper.js:83:26)
at HierarchicalByLocationProjection.applyTo (vscode-file://vscode-app/c:/Users/ther3/dev/vscode/out/vs/workbench/contrib/testing/browser/explorerProjections/hierarchalByLocation.js:190:26)
at TestingExplorerViewModel.applyProjectionChanges (vscode-file://vscode-app/c:/Users/ther3/dev/vscode/out/vs/workbench/contrib/testing/browser/testingExplorerView.js:590:36)
at RunOnceScheduler.runner (vscode-file://vscode-app/c:/Users/ther3/dev/vscode/out/vs/workbench/contrib/testing/browser/testingExplorerView.js:579:71)
at RunOnceScheduler.doRun (vscode-file://vscode-app/c:/Users/ther3/dev/vscode/out/vs/base/common/async.js:706:26)
at RunOnceScheduler.onTimeout (vscode-file://vscode-app/c:/Users/ther3/dev/vscode/out/vs/base/common/async.js:702:22)
onUnexpectedError @ bootstrap-window.js:254
(anonymous) @ bootstrap-window.js:52
emit @ node:events:390
window.onerror @ node:electron/js2c/renderer_init:73
platform_1.globals.onerror @ errorTelemetry.ts:20
nodeHelper.ts:13 Uncaught TypeError: Cannot read properties of undefined (reading 'expand')
at Object.getId (nodeHelper.ts:13:47)
at indexTreeModel.ts:275:79
at Array.map ()
at IndexTreeModel.spliceSimple (indexTreeModel.ts:275:49)
at IndexTreeModel.spliceSmart (indexTreeModel.ts:170:16)
at IndexTreeModel.splice (indexTreeModel.ts:154:9)
at ObjectTreeModel._setChildren (objectTreeModel.ts:122:14)
at ObjectTreeModel.setChildren (objectTreeModel.ts:71:8)
at WorkbenchObjectTree.setChildren (objectTree.ts:63:14)
at NodeChangeList.applyTo (nodeHelper.ts:101:10)
at HierarchicalByLocationProjection.applyTo (hierarchalByLocation.ts:195:16)
at TestingExplorerViewModel.applyProjectionChanges (testingExplorerView.ts:785:26)
at RunOnceScheduler.runner (testingExplorerView.ts:772:53)
at RunOnceScheduler.doRun (async.ts:886:16)
at RunOnceScheduler.onTimeout (async.ts:881:9)

Metadata

Metadata

Assignees

Labels

bugIssue identified by VS Code Team member as probable buginsiders-releasedPatch has been released in VS Code InsiderstestingBuilt-in testing supportverifiedVerification succeeded

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions