@@ -177,7 +177,9 @@ describe('createListenerMiddleware', () => {
177177
178178 describe ( 'Subscription and unsubscription' , ( ) => {
179179 test ( 'directly subscribing' , ( ) => {
180- const effect = vi . fn ( ( _ : TestAction1 ) => { } )
180+ const effect = vi . fn ( ( _ : TestAction1 ) => {
181+ /** No-Op */
182+ } )
181183
182184 startListening ( {
183185 actionCreator : testAction1 ,
@@ -195,7 +197,9 @@ describe('createListenerMiddleware', () => {
195197 } )
196198
197199 test ( 'stopListening returns true if an entry has been unsubscribed, false otherwise' , ( ) => {
198- const effect = vi . fn ( ( _ : TestAction1 ) => { } )
200+ const effect = vi . fn ( ( _ : TestAction1 ) => {
201+ /** No-Op */
202+ } )
199203
200204 startListening ( {
201205 actionCreator : testAction1 ,
@@ -207,7 +211,9 @@ describe('createListenerMiddleware', () => {
207211 } )
208212
209213 test ( 'dispatch(removeListener({...})) returns true if an entry has been unsubscribed, false otherwise' , ( ) => {
210- const effect = vi . fn ( ( _ : TestAction1 ) => { } )
214+ const effect = vi . fn ( ( _ : TestAction1 ) => {
215+ /** No-Op */
216+ } )
211217
212218 startListening ( {
213219 actionCreator : testAction1 ,
@@ -233,7 +239,9 @@ describe('createListenerMiddleware', () => {
233239 } )
234240
235241 test ( 'can subscribe with a string action type' , ( ) => {
236- const effect = vi . fn ( ( _ : UnknownAction ) => { } )
242+ const effect = vi . fn ( ( _ : UnknownAction ) => {
243+ /** No-Op */
244+ } )
237245
238246 store . dispatch (
239247 addListener ( {
@@ -252,7 +260,9 @@ describe('createListenerMiddleware', () => {
252260 } )
253261
254262 test ( 'can subscribe with a matcher function' , ( ) => {
255- const effect = vi . fn ( ( _ : UnknownAction ) => { } )
263+ const effect = vi . fn ( ( _ : UnknownAction ) => {
264+ /** No-Op */
265+ } )
256266
257267 const isAction1Or2 = isAnyOf ( testAction1 , testAction2 )
258268
@@ -319,7 +329,9 @@ describe('createListenerMiddleware', () => {
319329 } )
320330
321331 test ( 'subscribing with the same listener will not make it trigger twice (like EventTarget.addEventListener())' , ( ) => {
322- const effect = vi . fn ( ( _ : TestAction1 ) => { } )
332+ const effect = vi . fn ( ( _ : TestAction1 ) => {
333+ /** No-Op */
334+ } )
323335
324336 startListening ( {
325337 actionCreator : testAction1 ,
@@ -341,7 +353,9 @@ describe('createListenerMiddleware', () => {
341353 } )
342354
343355 test ( 'subscribing with the same effect but different predicate is allowed' , ( ) => {
344- const effect = vi . fn ( ( _ : TestAction1 | TestAction2 ) => { } )
356+ const effect = vi . fn ( ( _ : TestAction1 | TestAction2 ) => {
357+ /** No-Op */
358+ } )
345359
346360 startListening ( {
347361 actionCreator : testAction1 ,
@@ -362,7 +376,9 @@ describe('createListenerMiddleware', () => {
362376 } )
363377
364378 test ( 'unsubscribing via callback' , ( ) => {
365- const effect = vi . fn ( ( _ : TestAction1 ) => { } )
379+ const effect = vi . fn ( ( _ : TestAction1 ) => {
380+ /** No-Op */
381+ } )
366382
367383 const unsubscribe = startListening ( {
368384 actionCreator : testAction1 ,
@@ -378,7 +394,9 @@ describe('createListenerMiddleware', () => {
378394 } )
379395
380396 test ( 'directly unsubscribing' , ( ) => {
381- const effect = vi . fn ( ( _ : TestAction1 ) => { } )
397+ const effect = vi . fn ( ( _ : TestAction1 ) => {
398+ /** No-Op */
399+ } )
382400
383401 startListening ( {
384402 actionCreator : testAction1 ,
@@ -399,7 +417,9 @@ describe('createListenerMiddleware', () => {
399417 } )
400418
401419 test ( 'subscribing via action' , ( ) => {
402- const effect = vi . fn ( ( _ : TestAction1 ) => { } )
420+ const effect = vi . fn ( ( _ : TestAction1 ) => {
421+ /** No-Op */
422+ } )
403423
404424 store . dispatch (
405425 addListener ( {
@@ -419,7 +439,9 @@ describe('createListenerMiddleware', () => {
419439 } )
420440
421441 test ( 'unsubscribing via callback from dispatch' , ( ) => {
422- const effect = vi . fn ( ( _ : TestAction1 ) => { } )
442+ const effect = vi . fn ( ( _ : TestAction1 ) => {
443+ /** No-Op */
444+ } )
423445
424446 const unsubscribe = store . dispatch (
425447 addListener ( {
@@ -438,7 +460,9 @@ describe('createListenerMiddleware', () => {
438460 } )
439461
440462 test ( 'unsubscribing via action' , ( ) => {
441- const effect = vi . fn ( ( _ : TestAction1 ) => { } )
463+ const effect = vi . fn ( ( _ : TestAction1 ) => {
464+ /** No-Op */
465+ } )
442466
443467 startListening ( {
444468 actionCreator : testAction1 ,
@@ -658,7 +682,7 @@ describe('createListenerMiddleware', () => {
658682 let listenerCancelled = false
659683 let listenerStarted = false
660684 let listenerCompleted = false
661- let cancelListener : ( ) => void = ( ) => { }
685+ let cancelListener : ( ) => void = noop
662686 let error : TaskAbortError | undefined = undefined
663687
664688 startListening ( {
@@ -950,7 +974,9 @@ describe('createListenerMiddleware', () => {
950974 test ( 'by default, actions are forwarded to the store' , ( ) => {
951975 reducer . mockClear ( )
952976
953- const effect = vi . fn ( ( _ : TestAction1 ) => { } )
977+ const effect = vi . fn ( ( _ : TestAction1 ) => {
978+ /** No-Op */
979+ } )
954980
955981 startListening ( {
956982 actionCreator : testAction1 ,
@@ -1015,7 +1041,7 @@ describe('createListenerMiddleware', () => {
10151041 } ,
10161042 } )
10171043
1018- const effect = vi . fn ( ( ) => { } )
1044+ const effect = vi . fn ( noop )
10191045 startListening ( { matcher, effect } )
10201046
10211047 store . dispatch ( testAction1 ( 'a' ) )
@@ -1024,8 +1050,8 @@ describe('createListenerMiddleware', () => {
10241050
10251051 test ( 'Continues running other listeners if a predicate raises an error' , ( ) => {
10261052 const matcher = ( action : any ) : action is any => true
1027- const firstListener = vi . fn ( ( ) => { } )
1028- const secondListener = vi . fn ( ( ) => { } )
1053+ const firstListener = vi . fn ( noop )
1054+ const secondListener = vi . fn ( noop )
10291055
10301056 startListening ( {
10311057 // @ts -expect-error
0 commit comments