You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Can there be an option to .file() and .directory() which cleans up files/directories on process.exit?
Example: tempy.directory({ cleanup: true })
I've tried using tempy.file.task() but Jest ignores tests enclosed in any external function.
Example:
describe("Sample test",()=>{tempy.file.task(tempFile=>{// Both these tests dont get executed by Jestit("Sample 1",()=>{expect(true).toBeTruthy()// Wanted to use the file in here.})it("Sample 2",()=>{expect(true).toBeTruthy()// And the same file here again.})})})
I can create a file/directory externally outside and then delete it myself, but that would be tedious. Temporary files on Windows don't get deleted automatically unlike on MacOS, so an option to cleanup on node process exit would be pretty convenient.
The text was updated successfully, but these errors were encountered:
If {cleanup: true} option is passed maybe create file in temporary directories (/tmp for linux and %localappdata%\Temp for windows). For windows system, files may be not deleted automatically but wont be a task for manual deletion for the user.
What are your thoughts?
Can there be an option to
.file()
and.directory()
which cleans up files/directories on process.exit?Example:
tempy.directory({ cleanup: true })
I've tried using
tempy.file.task()
but Jest ignores tests enclosed in any external function.Example:
I can create a file/directory externally outside and then delete it myself, but that would be tedious. Temporary files on Windows don't get deleted automatically unlike on MacOS, so an option to cleanup on node process exit would be pretty convenient.
The text was updated successfully, but these errors were encountered: