Explicit cleanup operation
Tmp Version
0.2.3
Expected Behavior
It would be great if tmp exposed a synchronous cleanup operation, which would remove all the controlled files when called. This method could be used in afterEach test blocks.
Experienced Behavior
Currently only setGracefulCleanup method exists, which does not work reliably with test runners.
depending on your host operating system, the cleanup operation might also not work as some os tend to keep locks on files. so, we cannot do anything about that.
I welcome the idea, which aligns with what I considered doing in the TypeScript refactor branch.
Of course, the dependent would need to close the file descriptors to be able to do this, but that is also the case for the graceful cleanup feature, that I would like to sunset.