summaryrefslogtreecommitdiff
path: root/test/parallel/test-fs-truncate-fd.js
diff options
context:
space:
mode:
Diffstat (limited to 'test/parallel/test-fs-truncate-fd.js')
-rw-r--r--test/parallel/test-fs-truncate-fd.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/test/parallel/test-fs-truncate-fd.js b/test/parallel/test-fs-truncate-fd.js
index f71d511f5d..fbddbb32d5 100644
--- a/test/parallel/test-fs-truncate-fd.js
+++ b/test/parallel/test-fs-truncate-fd.js
@@ -21,7 +21,7 @@ fs.truncate(fd, 5, common.mustCall((err) => {
assert.strictEqual(fs.readFileSync(filename, 'utf8'), 'hello');
}));
-process.on('exit', () => {
+process.once('beforeExit', () => {
fs.closeSync(fd);
fs.unlinkSync(filename);
console.log('ok');