Skip to content

Commit 23525b0

Browse files
lundibunditargos
authored andcommittedOct 3, 2018
test: replace localhost with os.hostname in fs-readfilesync
PR-URL: #23101 Fixes: #21501 Reviewed-By: Anna Henningsen <[email protected]> Reviewed-By: John-David Dalton <[email protected]>
1 parent d572f60 commit 23525b0

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed
 

‎test/parallel/test-fs-readfilesync-enoent.js

+5-4
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ if (!common.isWindows)
1111

1212
const assert = require('assert');
1313
const fs = require('fs');
14+
const os = require('os');
1415
const path = require('path');
1516

1617
function test(p) {
@@ -23,10 +24,10 @@ function test(p) {
2324
}));
2425
}
2526

26-
test('//localhost/c$/Windows/System32');
27-
test('//localhost/c$/Windows');
28-
test('//localhost/c$/');
29-
test('\\\\localhost\\c$\\');
27+
test(`//${os.hostname()}/c$/Windows/System32`);
28+
test(`//${os.hostname()}/c$/Windows`);
29+
test(`//${os.hostname()}/c$/`);
30+
test(`\\\\${os.hostname()}\\c$\\`);
3031
test('C:\\');
3132
test('C:');
3233
test(process.env.windir);

0 commit comments

Comments
 (0)