From: Ardis Lu Date: Sun, 9 Feb 2025 06:04:59 +0000 (-0800) Subject: Explicitly close file handle X-Git-Tag: v0.1.0~63 X-Git-Url: https://git.ardis.lu/?a=commitdiff_plain;h=fc9f87c603e93e48353729ba39919b75debb6260;p=csvio Explicitly close file handle Dismisses "Closing a FileHandle object on garbage collection" warnings in tests. --- diff --git a/test/utils.js b/test/utils.js index deadbd4..a6998fb 100644 --- a/test/utils.js +++ b/test/utils.js @@ -146,7 +146,8 @@ export async function createTempFolder() { */ export async function createTempFile() { const path = normalize(`${tmpdir()}/csvio_test_${crypto.randomUUID()}.tmp`); - await open(path, 'a+'); + const handle = await open(path, 'a+'); + await handle.close(); return path; }