From bf516cec2118b42a8cc86c093b7eb8d31dcb497b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jo=C3=A3o=20Reis?= Date: Tue, 30 Jul 2019 14:53:21 +0100 Subject: [PATCH] fixup! test: clean tmpdir on process exit Suggestions by Rich Trott --- test/common/README.md | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/test/common/README.md b/test/common/README.md index 3ad21ea4d0cc3d..76ab605c79ee39 100644 --- a/test/common/README.md +++ b/test/common/README.md @@ -906,11 +906,12 @@ The realpath of the testing temporary directory. Deletes and recreates the testing temporary directory. -The first time refresh is run it adds a listener to process `'exit'` that +The first time `refresh()` runs, it adds a listener to process `'exit'` that cleans the temporary directory. Thus, every file under `tmpdir.path` needs to be closed before the test completes. A good way to do this is to add a -listener to process `'beforeExit'`. If a file needs to be left open until Node -completes, use a child process and call `refresh` only in the parent. +listener to process `'beforeExit'`. If a file needs to be left open until +Node.js completes, use a child process and call `refresh()` only in the +parent. ## WPT Module