Skip to content

Commit

Permalink
fixup! test: clean tmpdir on process exit
Browse files Browse the repository at this point in the history
Suggestions by Rich Trott
  • Loading branch information
joaocgreis committed Jul 31, 2019
1 parent 333f67d commit bf516ce
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions test/common/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down

0 comments on commit bf516ce

Please sign in to comment.