@@ -359,6 +359,7 @@ describe('request(app)', function () {
359
359
. expect ( 404 )
360
360
. end ( function ( err , res ) {
361
361
err . message . should . equal ( 'expected 404 "Not Found", got 200 "OK"' ) ;
362
+ err . stack . should . match ( / t e s t \/ s u p e r t e s t .j s : / ) ;
362
363
done ( ) ;
363
364
} ) ;
364
365
} ) ;
@@ -419,6 +420,7 @@ describe('request(app)', function () {
419
420
. expect ( 200 , '' )
420
421
. end ( function ( err , res ) {
421
422
err . message . should . equal ( 'expected \'\' response body, got \'foo\'' ) ;
423
+ err . stack . should . match ( / t e s t \/ s u p e r t e s t .j s : / ) ;
422
424
done ( ) ;
423
425
} ) ;
424
426
} ) ;
@@ -440,6 +442,7 @@ describe('request(app)', function () {
440
442
. expect ( 'hey' )
441
443
. end ( function ( err , res ) {
442
444
err . message . should . equal ( 'expected \'hey\' response body, got \'{"foo":"bar"}\'' ) ;
445
+ err . stack . should . match ( / t e s t \/ s u p e r t e s t .j s : / ) ;
443
446
done ( ) ;
444
447
} ) ;
445
448
} ) ;
@@ -459,6 +462,7 @@ describe('request(app)', function () {
459
462
. expect ( 'hey' )
460
463
. end ( function ( err , res ) {
461
464
err . message . should . equal ( 'expected 200 "OK", got 500 "Internal Server Error"' ) ;
465
+ err . stack . should . match ( / t e s t \/ s u p e r t e s t .j s : / ) ;
462
466
done ( ) ;
463
467
} ) ;
464
468
} ) ;
@@ -491,6 +495,7 @@ describe('request(app)', function () {
491
495
. expect ( { foo : 'baz' } )
492
496
. end ( function ( err , res ) {
493
497
err . message . should . equal ( 'expected { foo: \'baz\' } response body, got { foo: \'bar\' }' ) ;
498
+ err . stack . should . match ( / t e s t \/ s u p e r t e s t .j s : / ) ;
494
499
495
500
request ( app )
496
501
. get ( '/' )
@@ -522,6 +527,7 @@ describe('request(app)', function () {
522
527
. expect ( { stringValue : 'foo' , numberValue : 3 , nestedObject : { innerString : 5 } } )
523
528
. end ( function ( err , res ) {
524
529
err . message . should . equal ( 'expected {\n stringValue: \'foo\',\n numberValue: 3,\n nestedObject: { innerString: 5 }\n} response body, got {\n stringValue: \'foo\',\n numberValue: 3,\n nestedObject: { innerString: \'5\' }\n}' ) ; // eslint-disable-line max-len
530
+ err . stack . should . match ( / t e s t \/ s u p e r t e s t .j s : / ) ;
525
531
526
532
request ( app )
527
533
. get ( '/' )
@@ -542,6 +548,7 @@ describe('request(app)', function () {
542
548
. expect ( / ^ b a r / )
543
549
. end ( function ( err , res ) {
544
550
err . message . should . equal ( 'expected body \'foobar\' to match /^bar/' ) ;
551
+ err . stack . should . match ( / t e s t \/ s u p e r t e s t .j s : / ) ;
545
552
done ( ) ;
546
553
} ) ;
547
554
} ) ;
@@ -560,6 +567,7 @@ describe('request(app)', function () {
560
567
. expect ( 'hey tj' )
561
568
. end ( function ( err , res ) {
562
569
err . message . should . equal ( "expected 'hey' response body, got 'hey tj'" ) ;
570
+ err . stack . should . match ( / t e s t \/ s u p e r t e s t .j s : / ) ;
563
571
done ( ) ;
564
572
} ) ;
565
573
} ) ;
@@ -592,6 +600,7 @@ describe('request(app)', function () {
592
600
. expect ( 'Content-Foo' , 'bar' )
593
601
. end ( function ( err , res ) {
594
602
err . message . should . equal ( 'expected "Content-Foo" header field' ) ;
603
+ err . stack . should . match ( / t e s t \/ s u p e r t e s t .j s : / ) ;
595
604
done ( ) ;
596
605
} ) ;
597
606
} ) ;
@@ -609,6 +618,7 @@ describe('request(app)', function () {
609
618
. end ( function ( err , res ) {
610
619
err . message . should . equal ( 'expected "Content-Type" of "text/html", '
611
620
+ 'got "application/json; charset=utf-8"' ) ;
621
+ err . stack . should . match ( / t e s t \/ s u p e r t e s t .j s : / ) ;
612
622
done ( ) ;
613
623
} ) ;
614
624
} ) ;
@@ -640,6 +650,7 @@ describe('request(app)', function () {
640
650
. end ( function ( err ) {
641
651
err . message . should . equal ( 'expected "Content-Type" matching /^application/, '
642
652
+ 'got "text/html; charset=utf-8"' ) ;
653
+ err . stack . should . match ( / t e s t \/ s u p e r t e s t .j s : / ) ;
643
654
done ( ) ;
644
655
} ) ;
645
656
} ) ;
@@ -656,6 +667,7 @@ describe('request(app)', function () {
656
667
. expect ( 'Content-Length' , 4 )
657
668
. end ( function ( err ) {
658
669
err . message . should . equal ( 'expected "Content-Length" of "4", got "3"' ) ;
670
+ err . stack . should . match ( / t e s t \/ s u p e r t e s t .j s : / ) ;
659
671
done ( ) ;
660
672
} ) ;
661
673
} ) ;
@@ -682,6 +694,7 @@ describe('request(app)', function () {
682
694
} )
683
695
. end ( function ( err ) {
684
696
err . message . should . equal ( 'failed' ) ;
697
+ err . stack . should . match ( / t e s t \/ s u p e r t e s t .j s : / ) ;
685
698
done ( ) ;
686
699
} ) ;
687
700
} ) ;
@@ -707,6 +720,7 @@ describe('request(app)', function () {
707
720
} )
708
721
. end ( function ( err ) {
709
722
err . message . should . equal ( 'some descriptive error' ) ;
723
+ err . stack . should . match ( / t e s t \/ s u p e r t e s t .j s : / ) ;
710
724
( err instanceof Error ) . should . be . true ;
711
725
done ( ) ;
712
726
} ) ;
@@ -747,6 +761,7 @@ describe('request(app)', function () {
747
761
. expect ( 'Content-Type' , / j s o n / )
748
762
. end ( function ( err ) {
749
763
err . message . should . match ( / C o n t e n t - T y p e / ) ;
764
+ err . stack . should . match ( / t e s t \/ s u p e r t e s t .j s : / ) ;
750
765
done ( ) ;
751
766
} ) ;
752
767
} ) ;
@@ -790,6 +805,7 @@ describe('request(app)', function () {
790
805
. end ( function ( err ) {
791
806
err . message . should . equal ( 'expected "Content-Type" matching /bloop/, '
792
807
+ 'got "text/html; charset=utf-8"' ) ;
808
+ err . stack . should . match ( / t e s t \/ s u p e r t e s t .j s : / ) ;
793
809
done ( ) ;
794
810
} ) ;
795
811
} ) ;
@@ -808,6 +824,7 @@ describe('request(app)', function () {
808
824
. end ( function ( err ) {
809
825
err . message . should . equal ( 'expected "Content-Type" matching /bloop/, '
810
826
+ 'got "text/html; charset=utf-8"' ) ;
827
+ err . stack . should . match ( / t e s t \/ s u p e r t e s t .j s : / ) ;
811
828
done ( ) ;
812
829
} ) ;
813
830
} ) ;
@@ -826,6 +843,7 @@ describe('request(app)', function () {
826
843
. end ( function ( err ) {
827
844
err . message . should . equal ( 'expected "Content-Type" matching /bloop/, '
828
845
+ 'got "text/html; charset=utf-8"' ) ;
846
+ err . stack . should . match ( / t e s t \/ s u p e r t e s t .j s : / ) ;
829
847
done ( ) ;
830
848
} ) ;
831
849
} ) ;
@@ -984,6 +1002,7 @@ describe('assert ordering by call order', function () {
984
1002
. end ( function ( err , res ) {
985
1003
err . message . should . equal ( 'expected \'hey\' response body, '
986
1004
+ 'got \'{"message":"something went wrong"}\'' ) ;
1005
+ err . stack . should . match ( / t e s t \/ s u p e r t e s t .j s : / ) ;
987
1006
done ( ) ;
988
1007
} ) ;
989
1008
} ) ;
@@ -1003,6 +1022,7 @@ describe('assert ordering by call order', function () {
1003
1022
. expect ( 'hey' )
1004
1023
. end ( function ( err , res ) {
1005
1024
err . message . should . equal ( 'expected 200 "OK", got 500 "Internal Server Error"' ) ;
1025
+ err . stack . should . match ( / t e s t \/ s u p e r t e s t .j s : / ) ;
1006
1026
done ( ) ;
1007
1027
} ) ;
1008
1028
} ) ;
@@ -1023,6 +1043,7 @@ describe('assert ordering by call order', function () {
1023
1043
. end ( function ( err , res ) {
1024
1044
err . message . should . equal ( 'expected "content-type" matching /html/, '
1025
1045
+ 'got "application/json; charset=utf-8"' ) ;
1046
+ err . stack . should . match ( / t e s t \/ s u p e r t e s t .j s : / ) ;
1026
1047
done ( ) ;
1027
1048
} ) ;
1028
1049
} ) ;
@@ -1195,6 +1216,7 @@ describe('request.get(url).query(vals) works as expected', function () {
1195
1216
. end ( function ( err , res ) {
1196
1217
err . should . be . an . instanceof ( Error ) ;
1197
1218
err . message . should . match ( / N o c k : D i s a l l o w e d n e t c o n n e c t / ) ;
1219
+ err . stack . should . match ( / t e s t \/ s u p e r t e s t .j s : / ) ;
1198
1220
done ( ) ;
1199
1221
} ) ;
1200
1222
0 commit comments