Skip to content

Commit d3981ae

Browse files
RaphaelRheaultMylesBorins
authored andcommitted
test: use fixtures module in test-fs-realpath.js
PR-URL: #15904 Reviewed-By: Daijiro Wachi <daijiro.wachi@gmail.com> Reviewed-By: Tobias Nießen <tniessen@tnie.de>
1 parent 532c960 commit d3981ae

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

test/parallel/test-fs-realpath.js

+5-3
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
'use strict';
22
const common = require('../common');
3+
const fixtures = require('../common/fixtures');
4+
35
const assert = require('assert');
46
const fs = require('fs');
57
const path = require('path');
@@ -111,7 +113,7 @@ function test_simple_absolute_symlink(callback) {
111113
console.log('using type=%s', type);
112114

113115
const entry = `${tmpAbsDir}/symlink`;
114-
const expected = `${common.fixturesDir}/nested-index/one`;
116+
const expected = fixtures.path('nested-index', 'one');
115117
[
116118
[entry, expected]
117119
].forEach(function(t) {
@@ -134,7 +136,7 @@ function test_deep_relative_file_symlink(callback) {
134136
return runNextTest();
135137
}
136138

137-
const expected = path.join(common.fixturesDir, 'cycles', 'root.js');
139+
const expected = fixtures.path('cycles', 'root.js');
138140
const linkData1 = path
139141
.relative(path.join(targetsAbsDir, 'nested-index', 'one'),
140142
expected);
@@ -163,7 +165,7 @@ function test_deep_relative_dir_symlink(callback) {
163165
common.printSkipMessage('symlink test (no privs)');
164166
return runNextTest();
165167
}
166-
const expected = path.join(common.fixturesDir, 'cycles', 'folder');
168+
const expected = fixtures.path('cycles', 'folder');
167169
const path1b = path.join(targetsAbsDir, 'nested-index', 'one');
168170
const linkPath1b = path.join(path1b, 'symlink1-dir');
169171
const linkData1b = path.relative(path1b, expected);

0 commit comments

Comments
 (0)