| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent 1860eae commit 3b22520
1 file changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -7,14 +7,14 @@ const fs = require('fs'); | |||
| 7 | 7 | common.refreshTmpDir(); | |
| 8 | 8 | ||
| 9 | 9 | // test creating and reading hard link | |
| 10 | - const srcPath = path.join(common.fixturesDir, 'cycles', 'root.js'); | ||
| 10 | + const srcPath = path.join(common.tmpDir, 'hardlink-target.txt'); | ||
| 11 | 11 | const dstPath = path.join(common.tmpDir, 'link1.js'); | |
| 12 | + fs.writeFileSync(srcPath, 'hello world'); | ||
| 12 | 13 | ||
| 13 | 14 | const callback = function(err) { | |
| 14 | 15 | if (err) throw err; | |
| 15 | - const srcContent = fs.readFileSync(srcPath, 'utf8'); | ||
| 16 | 16 | const dstContent = fs.readFileSync(dstPath, 'utf8'); | |
| 17 | - assert.strictEqual(srcContent, dstContent); | ||
| 17 | + assert.strictEqual('hello world', dstContent); | ||
| 18 | 18 | }; | |
| 19 | 19 | ||
| 20 | 20 | fs.link(srcPath, dstPath, common.mustCall(callback)); | |
| Back | FazBrowse Home | New Git URL |
0 commit comments