File tree Expand file tree Collapse file tree 4 files changed +6
-4
lines changed
test/specs/modules/Search Expand file tree Collapse file tree 4 files changed +6
-4
lines changed Original file line number Diff line number Diff line change @@ -71,7 +71,7 @@ export default class Search extends Component {
71
71
*/
72
72
results : PropTypes . oneOfType ( [
73
73
PropTypes . arrayOf ( PropTypes . shape ( SearchResult . propTypes ) ) ,
74
- PropTypes . object ,
74
+ PropTypes . shape ( SearchCategory . propTypes ) ,
75
75
] ) ,
76
76
77
77
/** Whether the search should automatically select the first result after searching. */
Original file line number Diff line number Diff line change @@ -45,7 +45,7 @@ export interface SearchResultProps {
45
45
renderer ?: ( props : SearchResultProps ) => Array < React . ReactElement < any > > ;
46
46
47
47
/** Display title. */
48
- title ? : string ;
48
+ title : string ;
49
49
}
50
50
51
51
declare const SearchResult : React . ComponentClass < SearchResultProps > ;
Original file line number Diff line number Diff line change @@ -73,7 +73,7 @@ export default class SearchResult extends Component {
73
73
renderer : PropTypes . func ,
74
74
75
75
/** Display title. */
76
- title : PropTypes . string ,
76
+ title : PropTypes . string . isRequired ,
77
77
}
78
78
79
79
static defaultProps = {
Original file line number Diff line number Diff line change 1
1
import SearchResult from 'src/modules/Search/SearchResult'
2
2
import * as common from 'test/specs/commonTests'
3
3
4
+ const requiredProps = { title : '' }
5
+
4
6
describe ( 'SearchResult' , ( ) => {
5
- common . isConformant ( SearchResult )
7
+ common . isConformant ( SearchResult , { requiredProps } )
6
8
common . propKeyOnlyToClassName ( SearchResult , 'active' )
7
9
} )
You can’t perform that action at this time.
0 commit comments