File tree Expand file tree Collapse file tree 2 files changed +17
-5
lines changed
Expand file tree Collapse file tree 2 files changed +17
-5
lines changed Original file line number Diff line number Diff line change @@ -8,7 +8,7 @@ import React, {
88
99import SchoolsList from './SchoolsList.jsx' ;
1010
11- class AppComponent extends Component {
11+ class MainComponent extends Component {
1212 constructor ( props , context ) {
1313 super ( props , context )
1414 }
@@ -21,9 +21,9 @@ class AppComponent extends Component {
2121 }
2222}
2323
24- AppComponent . defaultProps = {
24+ MainComponent . defaultProps = {
2525 schools : PropTypes . object . isRequired ,
2626 actions : PropTypes . object . isRequired
2727} ;
2828
29- export default AppComponent ;
29+ export default MainComponent ;
Original file line number Diff line number Diff line change @@ -15,14 +15,26 @@ import Main from 'components/Main';
1515import SchoolsList from 'components/SchoolsList' ;
1616
1717
18- describe ( 'MainComponent ' , ( ) => {
18+ describe ( 'AppComponent ' , ( ) => {
1919 let MainComponent ;
2020
2121 beforeEach ( ( ) => {
22- MainComponent = createComponent ( Main ) ;
22+ const props = Object . assign ( {
23+ schools : [ ] ,
24+ actions : { }
25+ } )
26+ MainComponent = createComponent ( Main , props ) ;
2327 } ) ;
2428
2529 it ( 'should render the SchoolsList' , ( ) => {
2630 expect ( MainComponent . type ) . toBeA ( Function )
2731 } ) ;
32+
33+ it ( 'should render a list of schools' , ( ) => {
34+ expect ( MainComponent . props . schools ) . toBeA ( Array )
35+ } ) ;
36+
37+ it ( 'should provide the list of actions' , ( ) => {
38+ expect ( MainComponent . props . actions ) . toBeA ( Object )
39+ } ) ;
2840} ) ;
You can’t perform that action at this time.
0 commit comments