Skip to content

Commit b1f370b

Browse files
author
coreybeaumont
committed
test: improved call to path.relative()
Improved the call to path.relative(). Also added comments explaining the use of a relative path.
1 parent f7a42ed commit b1f370b

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

test/parallel/test-net-connect-options-fd.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,9 @@ const forAllClients = (cb) => common.mustCall(cb, CLIENT_VARIANTS);
3333

3434
// Test Pipe fd is wrapped correctly
3535
{
36-
const prefix = path.relative(`${common.PIPE}-net-connect-options-fd`,
37-
`${__dirname}-net-connect-options-fd`);
36+
// Using relative path on osx if the path is greaterthan 108 chars
37+
// an AssertionError: -48 is thrown
38+
const prefix = path.relative('.', `${common.PIPE}-net-connect-options-fd`);
3839
const serverPath = `${prefix}-server`;
3940
let counter = 0;
4041
let socketCounter = 0;

0 commit comments

Comments
 (0)