()
| 345 | } |
| 346 | |
| 347 | get parent(): ?ReactTestInstance { |
| 348 | let parent = this._fiber.return; |
| 349 | while (parent !== null) { |
| 350 | if (validWrapperTypes.has(parent.tag)) { |
| 351 | if (parent.tag === HostRoot) { |
| 352 | // Special case: we only "materialize" instances for roots |
| 353 | // if they have more than a single child. So we'll check that now. |
| 354 | if (getChildren(parent).length < 2) { |
| 355 | return null; |
| 356 | } |
| 357 | } |
| 358 | return wrapFiber(parent); |
| 359 | } |
| 360 | parent = parent.return; |
| 361 | } |
| 362 | return null; |
| 363 | } |
| 364 | |
| 365 | get children(): Array<ReactTestInstance | string> { |
| 366 | return getChildren(this._currentFiber()); |
no test coverage detected