@@ -281,7 +281,7 @@ describe('ReactShallowRenderer with hooks', () => {
281
281
] ) ;
282
282
} ) ;
283
283
284
- it ( 'should trigger effects and cleanup depending on inputs' , ( ) => {
284
+ it ( 'should trigger effects and destroy depending on inputs' , ( ) => {
285
285
let _setFriend ;
286
286
const happenings = [ ] ;
287
287
@@ -294,7 +294,7 @@ describe('ReactShallowRenderer with hooks', () => {
294
294
( ) => {
295
295
happenings . push ( 'call friend effect' ) ;
296
296
return ( ) => {
297
- happenings . push ( 'cleanup friend effect' ) ;
297
+ happenings . push ( 'destroy friend effect' ) ;
298
298
} ;
299
299
} ,
300
300
[ friend ] ,
@@ -303,15 +303,15 @@ describe('ReactShallowRenderer with hooks', () => {
303
303
React . useEffect ( ( ) => {
304
304
happenings . push ( 'call empty effect' ) ;
305
305
return ( ) => {
306
- happenings . push ( 'cleanup empty effect' ) ;
306
+ happenings . push ( 'destroy empty effect' ) ;
307
307
} ;
308
308
} ) ;
309
309
310
310
React . useEffect (
311
311
( ) => {
312
312
happenings . push ( 'call cat effect' ) ;
313
313
return ( ) => {
314
- happenings . push ( 'cleanup cat effect' ) ;
314
+ happenings . push ( 'destroy cat effect' ) ;
315
315
} ;
316
316
} ,
317
317
[ cat ] ,
@@ -321,7 +321,7 @@ describe('ReactShallowRenderer with hooks', () => {
321
321
( ) => {
322
322
happenings . push ( 'call both effect' ) ;
323
323
return ( ) => {
324
- happenings . push ( 'cleanup both effect' ) ;
324
+ happenings . push ( 'destroy both effect' ) ;
325
325
} ;
326
326
} ,
327
327
[ friend , cat ] ,
@@ -347,11 +347,11 @@ describe('ReactShallowRenderer with hooks', () => {
347
347
happenings . splice ( 0 ) ;
348
348
_setFriend ( 'Maryam' ) ;
349
349
expect ( happenings ) . toEqual ( [
350
- 'cleanup friend effect' ,
350
+ 'destroy friend effect' ,
351
351
'call friend effect' ,
352
- 'cleanup empty effect' ,
352
+ 'destroy empty effect' ,
353
353
'call empty effect' ,
354
- 'cleanup both effect' ,
354
+ 'destroy both effect' ,
355
355
'call both effect' ,
356
356
] ) ;
357
357
} ) ;
0 commit comments