Skip to content

Instantly share code, notes, and snippets.

@FabricioFFC
Last active July 21, 2018 21:40
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save FabricioFFC/af52ee6796f65f4ffd412075d763e89b to your computer and use it in GitHub Desktop.
Save FabricioFFC/af52ee6796f65f4ffd412075d763e89b to your computer and use it in GitHub Desktop.
import React from 'react';
import renderer from 'react-test-renderer';
import { ActivityIndicator } from 'react-native';
import TeamsList from './src/components/TeamsList';
import App from './App';
it('renders the loading component when the app is first rendered', () => {
const rendered = renderer.create(<App />);
const TeamsListRendered = rendered.root.findByType(TeamsList);
const ActivityIndicatorRendered = TeamsListRendered.findByType(ActivityIndicator);
expect(ActivityIndicatorRendered).toBeTruthy();
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment