text: // @flow
  import React from 'react';
  import { Text, Image } from 'react-native';
  import { render } from '..';
  
  test('queryByText nested <Image> in <Text> at start', () => {
    expect(
      render(
        <Text>
          <Image source={{}} />
          Hello
        </Text>
      ).queryByText('Hello')
    ).toBeTruthy();
  });
  
  test('queryByText nested <Image> in <Text> at end', () => {
    expect(
      render(
        <Text>
          Hello
          <Image source={{}} />
        </Text>
      ).queryByText('Hello')
    ).toBeTruthy();
  });
  
  test('queryByText nested <Image> in <Text> in middle', () => {
    expect(
      render(
        <Text>
          Hello
          <Image source={{}} />
          World
        </Text>
      ).queryByText('HelloWorld')
    ).toBeTruthy();
  });
  
  test('queryByText not found', () => {
    expect(
      render(
        <Text>
          Hello
          <Image source={{}} />
        </Text>
      ).queryByText('SomethingElse')
    ).toBeFalsy();
  });
  
  test('queryByText nested multiple <Text> in <Text>', () => {
    expect(
      render(
        <Text>
          Hello{' '}
          <Text>
            World
            <Text>!{true}</Text>
          </Text>
        </Text>
      ).queryByText('Hello World!')
    ).toBeTruthy();
  });
  
  test('queryByText nested <CustomText> in <Text>', () => {
    const CustomText = ({ children }) => {
      return <Text>{children}</Text>;
    };
  
    expect(
      render(
        <Text>
          Hello <CustomText>World!</CustomText>
        </Text>
      ).queryByText('Hello World!')
    ).toBeTruthy();
  });
  