Skip to content

Commit 01058c4

Browse files
RaphaelRheaultgibfahn
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 fe9cca2 commit 01058c4

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
@@ -21,6 +21,8 @@
2121

2222
'use strict';
2323
const common = require('../common');
24+
const fixtures = require('../common/fixtures');
25+
2426
const assert = require('assert');
2527
const fs = require('fs');
2628
const path = require('path');
@@ -133,7 +135,7 @@ function test_simple_absolute_symlink(callback) {
133135
console.log('using type=%s', type);
134136

135137
const entry = `${tmpAbsDir}/symlink`;
136-
const expected = `${common.fixturesDir}/nested-index/one`;
138+
const expected = fixtures.path('nested-index', 'one');
137139
[
138140
[entry, expected]
139141
].forEach(function(t) {
@@ -156,7 +158,7 @@ function test_deep_relative_file_symlink(callback) {
156158
return runNextTest();
157159
}
158160

159-
const expected = path.join(common.fixturesDir, 'cycles', 'root.js');
161+
const expected = fixtures.path('cycles', 'root.js');
160162
const linkData1 = path
161163
.relative(path.join(targetsAbsDir, 'nested-index', 'one'),
162164
expected);
@@ -185,7 +187,7 @@ function test_deep_relative_dir_symlink(callback) {
185187
common.printSkipMessage('symlink test (no privs)');
186188
return runNextTest();
187189
}
188-
const expected = path.join(common.fixturesDir, 'cycles', 'folder');
190+
const expected = fixtures.path('cycles', 'folder');
189191
const path1b = path.join(targetsAbsDir, 'nested-index', 'one');
190192
const linkPath1b = path.join(path1b, 'symlink1-dir');
191193
const linkData1b = path.relative(path1b, expected);

0 commit comments

Comments
 (0)