(jsonChild)
| 98 | } |
| 99 | |
| 100 | function jsonChildToJSXChild(jsonChild) { |
| 101 | if (jsonChild === null || typeof jsonChild === 'string') { |
| 102 | return jsonChild; |
| 103 | } else { |
| 104 | const jsxChildren = jsonChildrenToJSXChildren(jsonChild.children); |
| 105 | return createJSXElementForTestComparison( |
| 106 | jsonChild.type, |
| 107 | jsxChildren === null |
| 108 | ? jsonChild.props |
| 109 | : {...jsonChild.props, children: jsxChildren}, |
| 110 | ); |
| 111 | } |
| 112 | } |
| 113 | |
| 114 | function jsonChildrenToJSXChildren(jsonChildren) { |
| 115 | if (jsonChildren !== null) { |
no test coverage detected