@@ -374,14 +374,15 @@ describe('DevtoolsExtension', () => {
374
374
} ) ;
375
375
376
376
describe ( 'with Action and actionsBlocklist' , ( ) => {
377
- const NORMAL_ACTION = 'NORMAL_ACTION' ;
378
- const BLOCKED_ACTION = 'BLOCKED_ACTION' ;
377
+ const NORMAL_ACTION = '[Test] NORMAL_ACTION' ;
378
+ const BLOCKED_ACTION_1 = '[Test] BLOCKED_ACTION #1' ;
379
+ const BLOCKED_ACTION_2 = '[Test] BLOCKED_ACTION #2' ;
379
380
380
381
beforeEach ( ( ) => {
381
382
devtoolsExtension = new DevtoolsExtension (
382
383
reduxDevtoolsExtension ,
383
384
createConfig ( {
384
- actionsBlocklist : [ BLOCKED_ACTION ] ,
385
+ actionsBlocklist : [ BLOCKED_ACTION_1 , BLOCKED_ACTION_2 ] ,
385
386
} ) ,
386
387
< any > null
387
388
) ;
@@ -402,22 +403,28 @@ describe('DevtoolsExtension', () => {
402
403
state
403
404
) ;
404
405
devtoolsExtension . notify (
405
- new PerformAction ( { type : BLOCKED_ACTION } , 1234567 ) ,
406
+ new PerformAction ( { type : BLOCKED_ACTION_1 } , 1234567 ) ,
407
+ state
408
+ ) ;
409
+ devtoolsExtension . notify (
410
+ new PerformAction ( { type : BLOCKED_ACTION_2 } , 1234567 ) ,
406
411
state
407
412
) ;
413
+
408
414
expect ( extensionConnection . send ) . toHaveBeenCalledTimes ( 2 ) ;
409
415
} ) ;
410
416
} ) ;
411
417
412
418
describe ( 'with Action and actionsSafelist' , ( ) => {
413
- const NORMAL_ACTION = 'NORMAL_ACTION' ;
414
- const SAFE_ACTION = 'SAFE_ACTION' ;
419
+ const NORMAL_ACTION = '[Test] NORMAL_ACTION' ;
420
+ const SAFE_ACTION_1 = '[Test] SAFE_ACTION #1' ;
421
+ const SAFE_ACTION_2 = '[Test] SAFE_ACTION #2' ;
415
422
416
423
beforeEach ( ( ) => {
417
424
devtoolsExtension = new DevtoolsExtension (
418
425
reduxDevtoolsExtension ,
419
426
createConfig ( {
420
- actionsSafelist : [ SAFE_ACTION ] ,
427
+ actionsSafelist : [ SAFE_ACTION_1 , SAFE_ACTION_2 ] ,
421
428
} ) ,
422
429
< any > null
423
430
) ;
@@ -438,10 +445,15 @@ describe('DevtoolsExtension', () => {
438
445
state
439
446
) ;
440
447
devtoolsExtension . notify (
441
- new PerformAction ( { type : SAFE_ACTION } , 1234567 ) ,
448
+ new PerformAction ( { type : SAFE_ACTION_1 } , 1234567 ) ,
442
449
state
443
450
) ;
444
- expect ( extensionConnection . send ) . toHaveBeenCalledTimes ( 1 ) ;
451
+ devtoolsExtension . notify (
452
+ new PerformAction ( { type : SAFE_ACTION_2 } , 1234567 ) ,
453
+ state
454
+ ) ;
455
+
456
+ expect ( extensionConnection . send ) . toHaveBeenCalledTimes ( 2 ) ;
445
457
} ) ;
446
458
} ) ;
447
459
0 commit comments