From fc9f87c603e93e48353729ba39919b75debb6260 Mon Sep 17 00:00:00 2001 From: Ardis Lu Date: Sat, 8 Feb 2025 22:04:59 -0800 Subject: [PATCH] Explicitly close file handle Dismisses "Closing a FileHandle object on garbage collection" warnings in tests. --- test/utils.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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; } -- 2.47.3