@@ -381,16 +381,14 @@ describe('reporter', () => {
381
381
it ( 'should add tags to request span when socket is not there' , ( ) => {
382
382
delete req . socket
383
383
384
- const result = Reporter . reportAttack ( [
384
+ Reporter . reportAttack ( [
385
385
{
386
386
rule : { } ,
387
387
rule_matches : [ { } ]
388
388
}
389
389
] )
390
390
391
- expect ( result ) . to . not . be . false
392
391
expect ( web . root ) . to . have . been . calledOnceWith ( req )
393
-
394
392
expect ( span . addTags ) . to . have . been . calledOnceWithExactly ( {
395
393
'appsec.event' : 'true' ,
396
394
'_dd.origin' : 'appsec' ,
@@ -399,15 +397,14 @@ describe('reporter', () => {
399
397
} )
400
398
401
399
it ( 'should add tags to request span' , ( ) => {
402
- const result = Reporter . reportAttack ( [
400
+ Reporter . reportAttack ( [
403
401
{
404
402
rule : { } ,
405
403
rule_matches : [ { } ]
406
404
}
407
405
] )
408
- expect ( result ) . to . not . be . false
409
- expect ( web . root ) . to . have . been . calledOnceWith ( req )
410
406
407
+ expect ( web . root ) . to . have . been . calledOnceWith ( req )
411
408
expect ( span . addTags ) . to . have . been . calledOnceWithExactly ( {
412
409
'appsec.event' : 'true' ,
413
410
'_dd.origin' : 'appsec' ,
@@ -419,10 +416,9 @@ describe('reporter', () => {
419
416
it ( 'should not overwrite origin tag' , ( ) => {
420
417
span . context ( ) . _tags = { '_dd.origin' : 'tracer' }
421
418
422
- const result = Reporter . reportAttack ( [ ] )
423
- expect ( result ) . to . not . be . false
424
- expect ( web . root ) . to . have . been . calledOnceWith ( req )
419
+ Reporter . reportAttack ( [ ] )
425
420
421
+ expect ( web . root ) . to . have . been . calledOnceWith ( req )
426
422
expect ( span . addTags ) . to . have . been . calledOnceWithExactly ( {
427
423
'appsec.event' : 'true' ,
428
424
'_dd.appsec.json' : '{"triggers":[]}' ,
@@ -433,7 +429,7 @@ describe('reporter', () => {
433
429
it ( 'should merge attacks json' , ( ) => {
434
430
span . context ( ) . _tags = { '_dd.appsec.json' : '{"triggers":[{"rule":{},"rule_matches":[{}]}]}' }
435
431
436
- const result = Reporter . reportAttack ( [
432
+ Reporter . reportAttack ( [
437
433
{
438
434
rule : { }
439
435
} ,
@@ -442,9 +438,8 @@ describe('reporter', () => {
442
438
rule_matches : [ { } ]
443
439
}
444
440
] )
445
- expect ( result ) . to . not . be . false
446
- expect ( web . root ) . to . have . been . calledOnceWith ( req )
447
441
442
+ expect ( web . root ) . to . have . been . calledOnceWith ( req )
448
443
expect ( span . addTags ) . to . have . been . calledOnceWithExactly ( {
449
444
'appsec.event' : 'true' ,
450
445
'_dd.origin' : 'appsec' ,
@@ -456,7 +451,7 @@ describe('reporter', () => {
456
451
it ( 'should call standalone sample' , ( ) => {
457
452
span . context ( ) . _tags = { '_dd.appsec.json' : '{"triggers":[{"rule":{},"rule_matches":[{}]}]}' }
458
453
459
- const result = Reporter . reportAttack ( [
454
+ Reporter . reportAttack ( [
460
455
{
461
456
rule : { }
462
457
} ,
@@ -465,9 +460,8 @@ describe('reporter', () => {
465
460
rule_matches : [ { } ]
466
461
}
467
462
] )
468
- expect ( result ) . to . not . be . false
469
- expect ( web . root ) . to . have . been . calledOnceWith ( req )
470
463
464
+ expect ( web . root ) . to . have . been . calledOnceWith ( req )
471
465
expect ( span . addTags ) . to . have . been . calledOnceWithExactly ( {
472
466
'appsec.event' : 'true' ,
473
467
'_dd.origin' : 'appsec' ,
0 commit comments