13
13
jest . autoMockOff ( ) ;
14
14
jest . mock ( '../../Documentation' ) ;
15
15
16
- describe ( 'propTypeHandler' , function ( ) {
16
+ describe ( 'propTypeHandler' , ( ) => {
17
17
var utils ;
18
18
var getPropTypeMock ;
19
19
var documentation ;
20
20
var propTypeHandler ;
21
21
22
- beforeEach ( function ( ) {
22
+ beforeEach ( ( ) => {
23
23
utils = require ( '../../../tests/utils' ) ;
24
24
getPropTypeMock = jest . genMockFunction ( ) . mockImplementation ( ( ) => ( { } ) ) ;
25
25
jest . setMock ( '../../utils/getPropType' , getPropTypeMock ) ;
@@ -38,7 +38,7 @@ describe('propTypeHandler', function() {
38
38
) ;
39
39
}
40
40
41
- it ( 'passes the correct argument to getPropType' , function ( ) {
41
+ it ( 'passes the correct argument to getPropType' , ( ) => {
42
42
var definition = parse (
43
43
'({propTypes: {foo: PropTypes.bool, abc: PropTypes.xyz}})'
44
44
) ;
@@ -52,7 +52,7 @@ describe('propTypeHandler', function() {
52
52
expect ( getPropTypeMock ) . toBeCalledWith ( xyzPath ) ;
53
53
} ) ;
54
54
55
- it ( 'finds definitions via React.PropTypes' , function ( ) {
55
+ it ( 'finds definitions via React.PropTypes' , ( ) => {
56
56
var definition = parse ( [
57
57
'({' ,
58
58
' propTypes: {' ,
@@ -76,7 +76,7 @@ describe('propTypeHandler', function() {
76
76
} ) ;
77
77
} ) ;
78
78
79
- it ( 'finds definitions via the ReactPropTypes module' , function ( ) {
79
+ it ( 'finds definitions via the ReactPropTypes module' , ( ) => {
80
80
var definition = parse ( [
81
81
'({' ,
82
82
' propTypes: {' ,
@@ -95,7 +95,7 @@ describe('propTypeHandler', function() {
95
95
} ) ;
96
96
} ) ;
97
97
98
- it ( 'detects whether a prop is required' , function ( ) {
98
+ it ( 'detects whether a prop is required' , ( ) => {
99
99
var definition = parse ( [
100
100
'({' ,
101
101
' propTypes: {' ,
@@ -119,7 +119,7 @@ describe('propTypeHandler', function() {
119
119
} ) ;
120
120
} ) ;
121
121
122
- it ( 'only considers definitions from React or ReactPropTypes' , function ( ) {
122
+ it ( 'only considers definitions from React or ReactPropTypes' , ( ) => {
123
123
var definition = parse ( [
124
124
'({' ,
125
125
' propTypes: {' ,
@@ -145,7 +145,7 @@ describe('propTypeHandler', function() {
145
145
} ) ;
146
146
} ) ;
147
147
148
- it ( 'understands the spread operator' , function ( ) {
148
+ it ( 'understands the spread operator' , ( ) => {
149
149
var definition = parse ( [
150
150
'var Foo = require("Foo.react");' ,
151
151
'var props = {bar: PropTypes.bool};' ,
@@ -172,7 +172,7 @@ describe('propTypeHandler', function() {
172
172
} ) ;
173
173
} ) ;
174
174
175
- it ( 'resolves variables' , function ( ) {
175
+ it ( 'resolves variables' , ( ) => {
176
176
var definition = parse ( [
177
177
'var props = {bar: PropTypes.bool};' ,
178
178
'({' ,
@@ -189,7 +189,7 @@ describe('propTypeHandler', function() {
189
189
} ) ;
190
190
} ) ;
191
191
192
- it ( 'does not error if propTypes cannot be found' , function ( ) {
192
+ it ( 'does not error if propTypes cannot be found' , ( ) => {
193
193
var definition = parse ( [
194
194
'({' ,
195
195
' fooBar: 42' ,
0 commit comments