()
| 28 | } |
| 29 | |
| 30 | function autoRegisterCleanup() { |
| 31 | // Automatically registers cleanup in supported testing frameworks |
| 32 | if (typeof afterEach === 'function' && !skipAutoCleanup()) { |
| 33 | afterEach(async () => { |
| 34 | await cleanup() |
| 35 | }) |
| 36 | } |
| 37 | } |
| 38 | |
| 39 | export { cleanup, addCleanup, removeCleanup, autoRegisterCleanup } |