Skip to content

Commit

Permalink
Merge 9807dda into 62c1aa2
Browse files Browse the repository at this point in the history
  • Loading branch information
mihir0x69 committed Nov 28, 2016
2 parents 62c1aa2 + 9807dda commit b6374ec
Show file tree
Hide file tree
Showing 74 changed files with 132 additions and 135 deletions.
33 changes: 19 additions & 14 deletions app/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,6 @@
// Needed for redux-saga es6 generator support
import 'babel-polyfill';

/* eslint-disable import/no-unresolved, import/extensions */
// Load the favicon, the manifest.json file and the .htaccess file
import 'file?name=[name].[ext]!./favicon.ico';
import '!file?name=[name].[ext]!./manifest.json';
import 'file?name=[name].[ext]!./.htaccess';
/* eslint-enable import/no-unresolved, import/extensions */

// Import all the third party stuff
import React from 'react';
import ReactDOM from 'react-dom';
Expand All @@ -23,15 +16,33 @@ import { applyRouterMiddleware, Router, browserHistory } from 'react-router';
import { syncHistoryWithStore } from 'react-router-redux';
import FontFaceObserver from 'fontfaceobserver';
import { useScroll } from 'react-router-scroll';
import 'sanitize.css/sanitize.css';

import configureStore from './store';

// Load the favicon, the manifest.json file and the .htaccess file
/* eslint-disable import/no-webpack-loader-syntax */
import '!file?name=[name].[ext]!./favicon.ico';
import '!file?name=[name].[ext]!./manifest.json';
import 'file?name=[name].[ext]!./.htaccess'; // eslint-disable-line import/extensions
/* eslint-enable import/no-webpack-loader-syntax */

// Import Language Provider
import LanguageProvider from 'containers/LanguageProvider';

// Import i18n messages
import { translationMessages } from './i18n';

// Import CSS reset and Global Styles
import 'sanitize.css/sanitize.css';
import './global-styles';

// Import selector for `syncHistoryWithStore`
import { selectLocationState } from 'containers/App/selectors';

// Import root app and routes
import App from 'containers/App';
import createRoutes from './routes';

// Observe loading of Open Sans (to remove open sans, remove the <link> tag in
// the index.html file and this observer)
const openSansObserver = new FontFaceObserver('Open Sans', {});
Expand All @@ -43,9 +54,6 @@ openSansObserver.load().then(() => {
document.body.classList.remove('fontLoaded');
});

// Import i18n messages
import { translationMessages } from './i18n';

// Create redux store with history
// this uses the singleton browserHistory provided by react-router
// Optionally, this could be changed to leverage a created history
Expand All @@ -56,14 +64,11 @@ const store = configureStore(initialState, browserHistory);
// Sync history and store, as the react-router-redux reducer
// is under the non-default key ("routing"), selectLocationState
// must be provided for resolving how to retrieve the "route" in the state
import { selectLocationState } from 'containers/App/selectors';
const history = syncHistoryWithStore(browserHistory, store, {
selectLocationState: selectLocationState(),
});

// Set up the router, wrapping all Routes in the App component
import App from 'containers/App';
import createRoutes from './routes';
const rootRoute = {
component: App,
childRoutes: createRoutes(store),
Expand Down
6 changes: 3 additions & 3 deletions app/components/A/tests/index.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@
* Testing our link component
*/

import A from '../index';

import { shallow } from 'enzyme';
import React from 'react';
import { shallow } from 'enzyme';

import A from '../index';

const href = 'http://mxstbr.com/';
const children = (<h1>Test</h1>);
Expand Down
1 change: 0 additions & 1 deletion app/components/Button/tests/A.test.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import React from 'react';

import { shallow } from 'enzyme';

import A from '../A';
Expand Down
1 change: 0 additions & 1 deletion app/components/Button/tests/StyledButton.test.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import React from 'react';

import { shallow } from 'enzyme';

import StyledButton from '../StyledButton';
Expand Down
1 change: 0 additions & 1 deletion app/components/Button/tests/Wrapper.test.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import React from 'react';

import { shallow } from 'enzyme';

import Wrapper from '../Wrapper';
Expand Down
6 changes: 3 additions & 3 deletions app/components/Button/tests/index.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@
* Testing our Button component
*/

import Button from '../index';

import { mount } from 'enzyme';
import React from 'react';
import { mount } from 'enzyme';

import Button from '../index';

const handleRoute = () => {};
const href = 'http://mxstbr.com';
Expand Down
1 change: 0 additions & 1 deletion app/components/Footer/tests/Wrapper.test.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import React from 'react';

import { shallow } from 'enzyme';

import Wrapper from '../Wrapper';
Expand Down
2 changes: 1 addition & 1 deletion app/components/Footer/tests/index.test.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { shallow } from 'enzyme';
import React from 'react';
import { shallow } from 'enzyme';
import { FormattedMessage } from 'react-intl';

import messages from '../messages';
Expand Down
6 changes: 3 additions & 3 deletions app/components/H1/tests/index.test.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import H1 from '../index';

import { shallow } from 'enzyme';
import React from 'react';
import { shallow } from 'enzyme';

import H1 from '../index';

describe('<H1 />', () => {
it('should render a prop', () => {
Expand Down
6 changes: 3 additions & 3 deletions app/components/H2/tests/index.test.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import H2 from '../index';

import { shallow } from 'enzyme';
import React from 'react';
import { shallow } from 'enzyme';

import H2 from '../index';

describe('<H2 />', () => {
it('should render a prop', () => {
Expand Down
6 changes: 3 additions & 3 deletions app/components/H3/tests/index.test.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import H3 from '../index';

import { shallow } from 'enzyme';
import React from 'react';
import { shallow } from 'enzyme';

import H3 from '../index';

describe('<H3 />', () => {
it('should render a prop', () => {
Expand Down
1 change: 0 additions & 1 deletion app/components/Header/tests/A.test.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import React from 'react';

import { mount, render } from 'enzyme';

import A from '../A';
Expand Down
1 change: 0 additions & 1 deletion app/components/Header/tests/Img.test.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import React from 'react';

import { mount, render } from 'enzyme';

import Img from '../Img';
Expand Down
2 changes: 1 addition & 1 deletion app/components/Header/tests/index.test.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { shallow } from 'enzyme';
import React from 'react';
import { shallow } from 'enzyme';

import Header from '../index';

Expand Down
7 changes: 3 additions & 4 deletions app/components/Img/tests/index.test.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
import Img from '../index';


import { shallow } from 'enzyme';
import React from 'react';
import { shallow } from 'enzyme';

import Img from '../index';

const src = 'test.png';
const alt = 'test';
Expand Down
6 changes: 3 additions & 3 deletions app/components/IssueIcon/tests/index.test.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import IssueIcon from '../index';

import { shallow } from 'enzyme';
import React from 'react';
import { shallow } from 'enzyme';

import IssueIcon from '../index';

describe('<IssueIcon />', () => {
it('should render a SVG', () => {
Expand Down
1 change: 0 additions & 1 deletion app/components/List/tests/Ul.test.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import React from 'react';

import { shallow } from 'enzyme';

import Ul from '../Ul';
Expand Down
1 change: 0 additions & 1 deletion app/components/List/tests/Wrapper.test.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import React from 'react';

import { shallow } from 'enzyme';

import Wrapper from '../Wrapper';
Expand Down
2 changes: 1 addition & 1 deletion app/components/List/tests/index.test.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { render } from 'enzyme';
import React from 'react';
import { render } from 'enzyme';

import List from '../index';
import ListItem from 'components/ListItem';
Expand Down
1 change: 0 additions & 1 deletion app/components/ListItem/tests/Item.test.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import React from 'react';

import { shallow } from 'enzyme';

import Item from '../Item';
Expand Down
1 change: 0 additions & 1 deletion app/components/ListItem/tests/Wrapper.test.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import React from 'react';

import { shallow } from 'enzyme';

import Wrapper from '../Wrapper';
Expand Down
6 changes: 3 additions & 3 deletions app/components/ListItem/tests/index.test.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import ListItem from '../index';

import { mount } from 'enzyme';
import React from 'react';
import { mount } from 'enzyme';

import ListItem from '../index';

describe('<ListItem />', () => {
it('should have a className', () => {
Expand Down
1 change: 0 additions & 1 deletion app/components/LoadingIndicator/tests/Circle.test.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import React from 'react';

import { mount } from 'enzyme';

import Circle from '../Circle';
Expand Down
1 change: 0 additions & 1 deletion app/components/LoadingIndicator/tests/Wrapper.test.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import React from 'react';

import { shallow } from 'enzyme';

import Wrapper from '../Wrapper';
Expand Down
5 changes: 2 additions & 3 deletions app/components/LoadingIndicator/tests/index.test.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
import LoadingIndicator from '../index';

import React from 'react';
import { render } from 'enzyme';

import React from 'react';
import LoadingIndicator from '../index';

describe('<LoadingIndicator />', () => {
it('should render 13 divs', () => {
Expand Down
1 change: 0 additions & 1 deletion app/components/Toggle/tests/Select.test.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import React from 'react';

import { shallow } from 'enzyme';

import Select from '../Select';
Expand Down
6 changes: 3 additions & 3 deletions app/components/Toggle/tests/index.test.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import Toggle from '../index';

import React from 'react';
import { shallow } from 'enzyme';
import { IntlProvider, defineMessages } from 'react-intl';
import React from 'react';

import Toggle from '../index';

describe('<Toggle />', () => {
it('should contain default text', () => {
Expand Down
6 changes: 3 additions & 3 deletions app/components/ToggleOption/tests/index.test.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import ToggleOption from '../index';

import React from 'react';
import { shallow } from 'enzyme';
import { IntlProvider, defineMessages } from 'react-intl';
import React from 'react';

import ToggleOption from '../index';

describe('<ToggleOption />', () => {
it('should render default language messages', () => {
Expand Down
3 changes: 2 additions & 1 deletion app/containers/App/reducer.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,13 @@
* return state.set('yourStateVariable', true);
*/

import { fromJS } from 'immutable';

import {
LOAD_REPOS_SUCCESS,
LOAD_REPOS,
LOAD_REPOS_ERROR,
} from './constants';
import { fromJS } from 'immutable';

// The initial state of the App
const initialState = fromJS({
Expand Down
6 changes: 3 additions & 3 deletions app/containers/App/tests/index.test.js
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import React from 'react';
import { shallow } from 'enzyme';

import App from '../index';
import Header from 'components/Header';
import Footer from 'components/Footer';

import { shallow } from 'enzyme';
import React from 'react';

describe('<App />', () => {
it('should render the header', () => {
const renderedComponent = shallow(
Expand Down
3 changes: 2 additions & 1 deletion app/containers/App/tests/reducer.test.js
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
import { fromJS } from 'immutable';

import appReducer from '../reducer';
import {
loadRepos,
reposLoaded,
repoLoadingError,
} from '../actions';
import { fromJS } from 'immutable';

describe('appReducer', () => {
let state;
Expand Down
2 changes: 1 addition & 1 deletion app/containers/FeaturePage/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@
*/
import React from 'react';
import Helmet from 'react-helmet';
import { FormattedMessage } from 'react-intl';

import messages from './messages';
import { FormattedMessage } from 'react-intl';
import H1 from 'components/H1';
import List from './List';
import ListItem from './ListItem';
Expand Down
1 change: 0 additions & 1 deletion app/containers/FeaturePage/tests/List.test.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import React from 'react';

import { shallow } from 'enzyme';

import List from '../List';
Expand Down
1 change: 0 additions & 1 deletion app/containers/FeaturePage/tests/ListItem.test.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import React from 'react';

import { shallow } from 'enzyme';

import ListItem from '../ListItem';
Expand Down
1 change: 0 additions & 1 deletion app/containers/FeaturePage/tests/ListItemTitle.test.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import React from 'react';

import { shallow } from 'enzyme';

import ListItemTitle from '../ListItemTitle';
Expand Down
4 changes: 2 additions & 2 deletions app/containers/FeaturePage/tests/index.test.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { shallow } from 'enzyme';
import React from 'react';

import { shallow } from 'enzyme';
import { FormattedMessage } from 'react-intl';

import messages from '../messages';
import FeaturePage from '../index';
import H1 from 'components/H1';
Expand Down
2 changes: 1 addition & 1 deletion app/containers/HomePage/reducer.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,11 @@
* case YOUR_ACTION_CONSTANT:
* return state.set('yourStateVariable', true);
*/
import { fromJS } from 'immutable';

import {
CHANGE_USERNAME,
} from './constants';
import { fromJS } from 'immutable';

// The initial state of the App
const initialState = fromJS({
Expand Down

0 comments on commit b6374ec

Please sign in to comment.