Skip to content
This repository was archived by the owner on Sep 1, 2024. It is now read-only.

Commit 88e1b3d

Browse files
committed
[Tests] convert normal it functions to arrow functions
1 parent bdc31fa commit 88e1b3d

File tree

1 file changed

+27
-27
lines changed

1 file changed

+27
-27
lines changed

__tests__/PropTypesProductionStandalone-test.js

+27-27
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99

1010
'use strict';
1111

12-
describe('PropTypesProductionStandalone', function() {
12+
describe('PropTypesProductionStandalone', () => {
1313
let React;
1414
let PropTypes;
1515

@@ -21,11 +21,11 @@ describe('PropTypesProductionStandalone', function() {
2121
PropTypes = require('../index');
2222
}
2323

24-
beforeEach(function() {
24+
beforeEach(() => {
2525
resetWarningCache();
2626
});
2727

28-
afterEach(function() {
28+
afterEach(() => {
2929
delete process.env.NODE_ENV;
3030
});
3131

@@ -70,8 +70,8 @@ describe('PropTypesProductionStandalone', function() {
7070
expect(message).toBe(null);
7171
}
7272

73-
describe('Primitive Types', function() {
74-
it('should be a no-op', function() {
73+
describe('Primitive Types', () => {
74+
it('should be a no-op', () => {
7575
expectThrowsInProduction(PropTypes.array, /please/);
7676
expectThrowsInProduction(PropTypes.array.isRequired, /please/);
7777
expectThrowsInProduction(PropTypes.array.isRequired, null);
@@ -112,16 +112,16 @@ describe('PropTypesProductionStandalone', function() {
112112
});
113113
});
114114

115-
describe('Any Type', function() {
116-
it('should be a no-op', function() {
115+
describe('Any Type', () => {
116+
it('should be a no-op', () => {
117117
expectThrowsInProduction(PropTypes.any, null);
118118
expectThrowsInProduction(PropTypes.any.isRequired, null);
119119
expectThrowsInProduction(PropTypes.any.isRequired, undefined);
120120
});
121121
});
122122

123-
describe('ArrayOf Type', function() {
124-
it('should be a no-op', function() {
123+
describe('ArrayOf Type', () => {
124+
it('should be a no-op', () => {
125125
expectThrowsInProduction(PropTypes.arrayOf({foo: PropTypes.string}), {
126126
foo: 'bar',
127127
});
@@ -145,8 +145,8 @@ describe('PropTypesProductionStandalone', function() {
145145
});
146146
});
147147

148-
describe('Component Type', function() {
149-
it('should be a no-op', function() {
148+
describe('Component Type', () => {
149+
it('should be a no-op', () => {
150150
expectThrowsInProduction(PropTypes.element, [<div />, <div />]);
151151
expectThrowsInProduction(PropTypes.element, 123);
152152
if (typeof BigInt === 'function') {
@@ -159,30 +159,30 @@ describe('PropTypesProductionStandalone', function() {
159159
});
160160
});
161161

162-
describe('Instance Types', function() {
163-
it('should be a no-op', function() {
162+
describe('Instance Types', () => {
163+
it('should be a no-op', () => {
164164
expectThrowsInProduction(PropTypes.instanceOf(Date), {});
165165
expectThrowsInProduction(PropTypes.instanceOf(Date).isRequired, {});
166166
});
167167
});
168168

169-
describe('React Component Types', function() {
170-
it('should be a no-op', function() {
169+
describe('React Component Types', () => {
170+
it('should be a no-op', () => {
171171
expectThrowsInProduction(PropTypes.node, {});
172172
expectThrowsInProduction(PropTypes.node.isRequired, null);
173173
expectThrowsInProduction(PropTypes.node.isRequired, undefined);
174174
});
175175
});
176176

177-
describe('React ElementType Type', function() {
178-
it('should be a no-op', function() {
177+
describe('React ElementType Type', () => {
178+
it('should be a no-op', () => {
179179
expectThrowsInProduction(PropTypes.elementType.isRequired, false);
180180
expectThrowsInProduction(PropTypes.elementType.isRequired, {});
181181
});
182182
});
183183

184-
describe('ObjectOf Type', function() {
185-
it('should be a no-op', function() {
184+
describe('ObjectOf Type', () => {
185+
it('should be a no-op', () => {
186186
expectThrowsInProduction(PropTypes.objectOf({foo: PropTypes.string}), {
187187
foo: 'bar',
188188
});
@@ -197,17 +197,17 @@ describe('PropTypesProductionStandalone', function() {
197197
});
198198
});
199199

200-
describe('OneOf Types', function() {
201-
it('should be a no-op', function() {
200+
describe('OneOf Types', () => {
201+
it('should be a no-op', () => {
202202
expectThrowsInProduction(PropTypes.oneOf('red', 'blue'), 'red');
203203
expectThrowsInProduction(PropTypes.oneOf(['red', 'blue']), true);
204204
expectThrowsInProduction(PropTypes.oneOf(['red', 'blue']), null);
205205
expectThrowsInProduction(PropTypes.oneOf(['red', 'blue']), undefined);
206206
});
207207
});
208208

209-
describe('Union Types', function() {
210-
it('should be a no-op', function() {
209+
describe('Union Types', () => {
210+
it('should be a no-op', () => {
211211
expectThrowsInProduction(
212212
PropTypes.oneOfType(PropTypes.string, PropTypes.number),
213213
'red',
@@ -227,8 +227,8 @@ describe('PropTypesProductionStandalone', function() {
227227
});
228228
});
229229

230-
describe('Shape Types', function() {
231-
it('should be a no-op', function() {
230+
describe('Shape Types', () => {
231+
it('should be a no-op', () => {
232232
expectThrowsInProduction(PropTypes.shape({}), 'some string');
233233
expectThrowsInProduction(
234234
PropTypes.shape({key: PropTypes.number}).isRequired,
@@ -241,8 +241,8 @@ describe('PropTypesProductionStandalone', function() {
241241
});
242242
});
243243

244-
describe('checkPropTypes', function() {
245-
it('does not call validators', function() {
244+
describe('checkPropTypes', () => {
245+
it('does not call validators', () => {
246246
spyOn(console, 'error');
247247

248248
const spy = jest.fn();

0 commit comments

Comments
 (0)