@@ -29,6 +29,8 @@ describe('ReactIs', () => {
29
29
expect ( ReactIs . typeOf ( { } ) ) . toBe ( undefined ) ;
30
30
expect ( ReactIs . typeOf ( null ) ) . toBe ( undefined ) ;
31
31
expect ( ReactIs . typeOf ( undefined ) ) . toBe ( undefined ) ;
32
+ expect ( ReactIs . typeOf ( NaN ) ) . toBe ( undefined ) ;
33
+ expect ( ReactIs . typeOf ( Symbol ( 'def' ) ) ) . toBe ( undefined ) ;
32
34
} ) ;
33
35
34
36
it ( 'identifies valid element types' , ( ) => {
@@ -37,6 +39,11 @@ describe('ReactIs', () => {
37
39
return React . createElement ( 'div' ) ;
38
40
}
39
41
}
42
+ class PureComponent extends React . PureComponent {
43
+ render ( ) {
44
+ return React . createElement ( 'div' ) ;
45
+ }
46
+ }
40
47
41
48
const FunctionComponent = ( ) => React . createElement ( 'div' ) ;
42
49
const ForwardRefComponent = React . forwardRef ( ( props , ref ) =>
@@ -48,6 +55,7 @@ describe('ReactIs', () => {
48
55
49
56
expect ( ReactIs . isValidElementType ( 'div' ) ) . toEqual ( true ) ;
50
57
expect ( ReactIs . isValidElementType ( Component ) ) . toEqual ( true ) ;
58
+ expect ( ReactIs . isValidElementType ( PureComponent ) ) . toEqual ( true ) ;
51
59
expect ( ReactIs . isValidElementType ( FunctionComponent ) ) . toEqual ( true ) ;
52
60
expect ( ReactIs . isValidElementType ( ForwardRefComponent ) ) . toEqual ( true ) ;
53
61
expect ( ReactIs . isValidElementType ( LazyComponent ) ) . toEqual ( true ) ;
0 commit comments