UNPKG

@testing-library/react-native

Version:

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

20 lines (19 loc) 430 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.getTextContent = getTextContent; function getTextContent(element) { if (!element) { return ''; } if (typeof element === 'string') { return element; } const result = []; element.children?.forEach(child => { result.push(getTextContent(child)); }); return result.join(''); } //# sourceMappingURL=getTextContent.js.map