diff --git a/test/parallel/test-fs-link.js b/test/parallel/test-fs-link.js index 4e95d20f7b6959..8444ecea782b60 100644 --- a/test/parallel/test-fs-link.js +++ b/test/parallel/test-fs-link.js @@ -7,14 +7,14 @@ const fs = require('fs'); common.refreshTmpDir(); // test creating and reading hard link -const srcPath = path.join(common.fixturesDir, 'cycles', 'root.js'); +const srcPath = path.join(common.tmpDir, 'hardlink-target.txt'); const dstPath = path.join(common.tmpDir, 'link1.js'); +fs.writeFileSync(srcPath, 'hello world'); const callback = function(err) { if (err) throw err; - const srcContent = fs.readFileSync(srcPath, 'utf8'); const dstContent = fs.readFileSync(dstPath, 'utf8'); - assert.strictEqual(srcContent, dstContent); + assert.strictEqual('hello world', dstContent); }; fs.link(srcPath, dstPath, common.mustCall(callback));