Skip to content

Commit 8e4b5ec

Browse files
Copilotgarrytrinder
andcommitted
Fix test fixture path resolution for Windows compatibility
Co-authored-by: garrytrinder <11563347+garrytrinder@users.noreply.github.com>
1 parent db14d38 commit 8e4b5ec

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

src/test/helpers.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,9 @@ 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+
// __dirname is out/test when tests are compiled
12+
// Go up two levels to reach the workspace root, then into src/test/examples
13+
return path.resolve(__dirname, '..', '..', 'src', 'test', 'examples', fileName);
1314
}
1415

1516
/**

0 commit comments

Comments
 (0)