MCPcopy
hub / github.com/testing-library/react-hooks-testing-library / autoRegisterCleanup

Function autoRegisterCleanup

src/core/cleanup.ts:30–37  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

28}
29
30function 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
39export { cleanup, addCleanup, removeCleanup, autoRegisterCleanup }

Callers 4

index.tsFile · 0.90
index.tsFile · 0.90
index.tsFile · 0.90
index.tsFile · 0.90

Calls 2

skipAutoCleanupFunction · 0.85
cleanupFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…