diff options
Diffstat (limited to 'test/parallel/test-fs-writefile-with-fd.js')
-rw-r--r-- | test/parallel/test-fs-writefile-with-fd.js | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/test/parallel/test-fs-writefile-with-fd.js b/test/parallel/test-fs-writefile-with-fd.js index 6851518d4d..a3436006b4 100644 --- a/test/parallel/test-fs-writefile-with-fd.js +++ b/test/parallel/test-fs-writefile-with-fd.js @@ -30,6 +30,9 @@ tmpdir.refresh(); /* New content should be written at position five, instead of zero. */ assert.deepStrictEqual(fs.readFileSync(filename).toString(), 'HelloWorld'); + + /* Close the file descriptor. */ + fs.closeSync(fd); } { @@ -52,6 +55,9 @@ tmpdir.refresh(); /* New content should be written at position five, instead of zero. */ assert.deepStrictEqual(fs.readFileSync(file).toString(), 'HelloWorld'); + + /* Close the file descriptor. */ + fs.closeSync(fd); })); })); })); |