UNPKG

@testing-library/react-native

Version:

Simple and complete React Native testing utilities that encourage good testing practices.

20 lines (19 loc) 459 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.addToCleanupQueue = addToCleanupQueue; exports.cleanup = cleanup; var _screen = require("./screen"); const cleanupQueue = new Set(); async function cleanup() { (0, _screen.clearRenderResult)(); for (const fn of cleanupQueue) { await fn(); } cleanupQueue.clear(); } function addToCleanupQueue(fn) { cleanupQueue.add(fn); } //# sourceMappingURL=cleanup.js.map