firsttris / vscode-jest-runner

Simple way to run or debug one or more tests from context menu, codelens or command plalette
https://marketplace.visualstudio.com/items?itemName=firsttris.vscode-jest-runner
MIT License
265 stars 124 forks source link

jestrunner.configPath.description is slightly misleading #342

Closed Bjoren closed 8 months ago

Bjoren commented 9 months ago

The description of the variable makes reference to an nonexistent vscode variable ${workFolder} and should be amended to say: "description": "Jest config path (relative to ${workspaceFolder} e.g. jest-config.json)",

In jestRunnerConfig.ts it is used as such: return normalizePath(path.join(this.currentWorkspaceFolderPath, configPath)); And gets the first half of the path here:

private get currentWorkspaceFolderPath(): string {
  const editor = vscode.window.activeTextEditor;
  return vscode.workspace.getWorkspaceFolder(editor.document.uri).uri.fsPath;
}

The VS Code documentation calls it ${workspaceFolder}.

PS: Thanks for this practical and well-written extension!