Skip to content

Commit

Permalink
test: use fixtures module in test-fs-realpath.js
Browse files Browse the repository at this point in the history
PR-URL: #15904
Reviewed-By: Daijiro Wachi <daijiro.wachi@gmail.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
  • Loading branch information
RaphaelRheault authored and MylesBorins committed Nov 21, 2017
1 parent a5e2511 commit b52c79b
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions test/parallel/test-fs-realpath.js
@@ -1,5 +1,7 @@
'use strict';
const common = require('../common');
const fixtures = require('../common/fixtures');

const assert = require('assert');
const fs = require('fs');
const path = require('path');
Expand Down Expand Up @@ -111,7 +113,7 @@ function test_simple_absolute_symlink(callback) {
console.log('using type=%s', type);

const entry = `${tmpAbsDir}/symlink`;
const expected = `${common.fixturesDir}/nested-index/one`;
const expected = fixtures.path('nested-index', 'one');
[
[entry, expected]
].forEach(function(t) {
Expand All @@ -134,7 +136,7 @@ function test_deep_relative_file_symlink(callback) {
return runNextTest();
}

const expected = path.join(common.fixturesDir, 'cycles', 'root.js');
const expected = fixtures.path('cycles', 'root.js');
const linkData1 = path
.relative(path.join(targetsAbsDir, 'nested-index', 'one'),
expected);
Expand Down Expand Up @@ -163,7 +165,7 @@ function test_deep_relative_dir_symlink(callback) {
common.printSkipMessage('symlink test (no privs)');
return runNextTest();
}
const expected = path.join(common.fixturesDir, 'cycles', 'folder');
const expected = fixtures.path('cycles', 'folder');
const path1b = path.join(targetsAbsDir, 'nested-index', 'one');
const linkPath1b = path.join(path1b, 'symlink1-dir');
const linkData1b = path.relative(path1b, expected);
Expand Down

0 comments on commit b52c79b

Please sign in to comment.