This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| const teams = [ | |
| { league: 'PremierLeague', team: 'Arsenal' }, | |
| { league: 'LaLiga', team: 'Barcelona' }, | |
| { league: 'SerieA', team: 'Milan' }, | |
| ]; | |
| for (let i = 0; i < teams.length; i += 1) { | |
| const league = teams[i].league; | |
| const team = teams[i].team; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import React from 'react'; | |
| import { shallow } from 'enzyme'; | |
| import toJson from 'enzyme-to-json'; | |
| import LeagueComponent from '../LeagueComponent' | |
| import mockStore from 'redux-mock-store'; | |
| import { FlatList } from 'react-native'; | |
| import { expect as expectChai } from 'chai'; | |
| const league = {"name":"English Premier League 2016/17","routeName":"PremierLeague","clubs":[{"key":"chelsea","name":"Chelsea","code":"CHE"},{"key":"arsenal","name":"Arsenal","code":"ARS"},{"key":"tottenham","name":"Tottenham Hotspur","code":"TOT"},{"key":"westham","name":"West Ham United","code":"WHU"},{"key":"crystalpalace","name":"Crystal Palace","code":"CRY"},{"key":"manutd","name":"Manchester United","code":"MUN"},{"key":"mancity","name":"Manchester City","code":"MCI"},{"key":"everton","name":"Everton","code":"EVE"},{"key":"liverpool","name":"Liverpool","code":"LIV"},{"key":"westbrom","name":"West Bromwich Albion","code":"WBA"},{"key":"stoke","name":"Stoke City","code":"STK"},{"key":"sunderland","name":"Sunderland","code":"SUN"},{"ke |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import { GET_TEAM } from './types'; | |
| export function getTeam(currentLeague, team) { | |
| return { | |
| type: GET_TEAM, | |
| payload: { currentLeague, team }, | |
| }; | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import React, { Component } from 'react'; | |
| import { Provider } from 'react-redux'; | |
| import Spinner from './components/loaders/Spinner'; | |
| import DrawerNavigation from './router/DrawerNavigation'; | |
| import configureStore from './configureStore'; | |
| function setup():React.Component { | |
| class Root extends Component { | |
| constructor(props) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import { GOTO_MATCH } from './types'; | |
| import { getMatch } from '../db'; | |
| export function gotoMatch(id) { | |
| return { | |
| type: GOTO_MATCH, | |
| payload: { match: getMatch(id) }, | |
| } | |
| } |
NewerOlder