diff --git a/scripts/git-hooks.test.mjs b/scripts/git-hooks.test.mjs index d140f87d7..c285265cb 100644 --- a/scripts/git-hooks.test.mjs +++ b/scripts/git-hooks.test.mjs @@ -56,7 +56,10 @@ test('pre-commit hook fixes staged imports and formatting without swallowing uns symlinkSync( join(repoRoot, 'node_modules'), join(tempRepo, 'node_modules'), - 'dir', + // Windows directory symlinks require an elevated token unless Developer + // Mode is enabled; junctions provide the same fixture semantics without + // that privilege requirement. + process.platform === 'win32' ? 'junction' : 'dir', ); const sourcePath = join(tempRepo, 'sample.ts');