Closed justorez closed 4 months ago
Hmmm interesting how the source maps don't seem to work?
Hmmm interesting how the source maps don't seem to work?
But I find bug seems to be here: src/testTree.ts#L311
getTestData(testItem)
returned a undefined value.
function getAPIFromTestItem(testItem: vscode.TestItem): VitestFolderAPI | null {
const data = getTestData(testItem)
// API is stored in test files - if this is a folder, try to find a file inside,
// otherwise go up until we find a file, this should never be a folder
if (data instanceof TestFolder)
return getAPIFromFolder(testItem)
if (data instanceof TestFile)
return data.api
return data.file.api
}
I cannot reproduce it with the link. Do you use other extensions? On your screenshot, this is not how we display tests.
@sheremet-va not sure if you're aware, but in the test explorer, you can still display tests as a list instead of a tree. This is a vscode feature. It's in the "..." menu. Maybe that could explain the screenshot difference.
Does it throw an error in the latest version? if it does, the error should be more descriptive at least.
Hello @justorez. Please provide a minimal reproduction using a GitHub repository or StackBlitz (you can also use examples). Issues marked with needs reproduction
will be closed if they have no activity within 3 days.
Does it throw an error in the latest version? if it does, the error should be more descriptive at least.
@sheremet-va Thanks, I saw it. And I know how to reproduce, just change testing view as list and refresh, view as tree
is ok.
Describe the bug
Reproduction
https://stackblitz.com/edit/stackblitz-starters-tn8las?file=package.json&view=editor
Output
Version
0.6.0
Validations