Skip to content

Commit 4639b54

Browse files
committed
test: specify 'dir' for directory symlinks
Directory symlinks in Windows require the 'dir' flag to be passed to create the symlink correctly. PR-URL: nodejs/node#19049 Reviewed-By: Richard Lau <[email protected]> Reviewed-By: Khaidi Chu <[email protected]> Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Luigi Pinca <[email protected]> Reviewed-By: Daniel Bevenius <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Ruben Bridgewater <[email protected]>
1 parent 9f0618c commit 4639b54

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

test/addons/symlinked-module/test.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ const addonPath = path.join(__dirname, 'build', common.buildType);
1818
const addonLink = path.join(common.tmpDir, 'addon');
1919

2020
try {
21-
fs.symlinkSync(addonPath, addonLink);
21+
fs.symlinkSync(addonPath, addonLink, 'dir');
2222
} catch (err) {
2323
if (err.code !== 'EPERM') throw err;
2424
common.skip('module identity test (no privs for symlinks)');

test/es-module/test-esm-symlink.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ try {
3636
fs.symlinkSync(real, link_absolute_path);
3737
fs.symlinkSync(path.basename(real), link_relative_path);
3838
fs.symlinkSync(real, link_ignore_extension);
39-
fs.symlinkSync(path.dirname(real), link_directory);
39+
fs.symlinkSync(path.dirname(real), link_directory, 'dir');
4040
} catch (err) {
4141
if (err.code !== 'EPERM') throw err;
4242
common.skip('insufficient privileges for symlinks');

test/parallel/test-module-symlinked-peer-modules.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ fs.mkdirSync(moduleB);
4242
// Attempt to make the symlink. If this fails due to lack of sufficient
4343
// permissions, the test will bail out and be skipped.
4444
try {
45-
fs.symlinkSync(moduleA, moduleA_link);
45+
fs.symlinkSync(moduleA, moduleA_link, 'dir');
4646
} catch (err) {
4747
if (err.code !== 'EPERM') throw err;
4848
common.skip('insufficient privileges for symlinks');

0 commit comments

Comments
 (0)