Skip to content

Commit d08b6ac

Browse files
Copilotgarrytrinder
andcommitted
Fix Windows fixture path resolution in tests
Co-authored-by: garrytrinder <11563347+garrytrinder@users.noreply.github.com>
1 parent 85be796 commit d08b6ac

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

src/test/helpers.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@ import { DevProxyInstall } from '../types';
88
* avoiding the need to copy them to out/ during build.
99
*/
1010
export function getFixturePath(fileName: string): string {
11-
// process.cwd() is the workspace root when running tests via VS Code test runner
12-
return path.resolve(process.cwd(), 'src', 'test', 'examples', fileName);
11+
const workspaceRoot = vscode.workspace.workspaceFolders?.[0]?.uri.fsPath ?? process.cwd();
12+
return path.resolve(workspaceRoot, 'src', 'test', 'examples', fileName);
1313
}
1414

1515
/**

0 commit comments

Comments
 (0)