Skip to content

Commit

Permalink
use effectiveUri for virtual folders when creating test items
Browse files Browse the repository at this point in the history
  • Loading branch information
akwodkiewicz committed Oct 13, 2023
1 parent 63f8ce4 commit 49bf971
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions src/test-provider/test-item-data.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ import { GENERIC_ERROR, getExitErrorDef, LONG_RUNNING_TESTS } from '../errors';
import { JestExtOutput } from '../JestExt/output-terminal';
import { tiContextManager } from './test-item-context-manager';
import { toAbsoluteRootPath } from '../helpers';
import { isVirtualWorkspaceFolder } from '../virtual-workspace-folder';

interface JestRunnable {
getJestRunRequest: () => JestExtRequestType;
Expand Down Expand Up @@ -133,10 +134,13 @@ export class WorkspaceRoot extends TestItemDataBase {
this.registerEvents();
}
createTestItem(): vscode.TestItem {
const workspaceFolder = this.context.ext.workspace;
const item = this.context.createTestItem(
`${extensionId}:${this.context.ext.workspace.name}`,
this.context.ext.workspace.name,
this.context.ext.workspace.uri,
`${extensionId}:${workspaceFolder.name}`,
workspaceFolder.name,
isVirtualWorkspaceFolder(workspaceFolder)
? workspaceFolder.effectiveUri
: workspaceFolder.uri,
this,
undefined,
['run']
Expand Down

0 comments on commit 49bf971

Please sign in to comment.