MCPcopy Index your code
hub / github.com/callstack/react-native-testing-library / cleanup

Function cleanup

src/cleanup.ts:7–15  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

5const cleanupQueue = new Set<CleanUpFunction>();
6
7export async function cleanup() {
8 clearRenderResult();
9
10 for (const fn of cleanupQueue) {
11 await fn();
12 }
13
14 cleanupQueue.clear();
15}
16
17export function addToCleanupQueue(fn: CleanUpFunction) {
18 cleanupQueue.add(fn);

Callers 5

input.tsxFile · 0.85
expected.tsxFile · 0.85
index.tsFile · 0.85
wait-for.test.tsxFile · 0.85
cleanup.test.tsxFile · 0.85

Calls 1

clearRenderResultFunction · 0.90

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…