Skip to content

Commit

Permalink
Decapitalize drive letter in rootFolder during test collection
Browse files Browse the repository at this point in the history
Fixes microsoft#8627. When the path of an actual test file (given by
vscode.Uri.fsPath) is later compared against the fullPath of a single
item of tests.TestFiles the drive letter mismatches and aborts further
actions despite the rest of the path is the same.
  • Loading branch information
Philipp Loose committed Nov 23, 2019
1 parent 34ebe55 commit 5aa22f2
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/client/testing/common/services/discoveredTestParser.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,11 @@ export class TestDiscoveredTestParser implements discovery.ITestDiscoveredTestPa
}

for (const data of discoveredTests) {
// Fixes #8627 - Codelens does not open dropdown for parametrized tests.
if (process.platform === 'win32') {
const [driveLetter, ...rest] = data.root.split(path.sep);
data.root = [driveLetter.toLowerCase()].concat(...rest).join(path.sep);
}
const rootFolder = {
name: data.root,
folders: [],
Expand Down

0 comments on commit 5aa22f2

Please sign in to comment.