@@ -617,69 +617,69 @@ for (var idx in frames) {
617
617
) ;
618
618
} ) ;
619
619
620
- it ( 'should capture unhandledrejection with error' , function ( done ) {
621
- var iframe = this . iframe ;
622
-
623
- iframeExecute (
624
- iframe ,
625
- done ,
626
- function ( ) {
627
- if ( isChrome ( ) ) {
628
- setTimeout ( function ( ) {
629
- return Promise . reject ( new Error ( 'test2' ) ) ;
630
- } ) ;
631
- } else {
632
- done ( ) ;
633
- }
634
- } ,
635
- function ( sentryData ) {
636
- if ( debounceAssertEventCount ( sentryData , 1 , done ) ) {
637
- assert . equal ( sentryData [ 0 ] . exception . values [ 0 ] . value , 'test2' ) ;
638
- assert . equal ( sentryData [ 0 ] . exception . values [ 0 ] . type , 'Error' ) ;
639
- assert . isAtLeast ( sentryData [ 0 ] . exception . values [ 0 ] . stacktrace . frames . length , 1 ) ;
640
- assert . equal ( sentryData [ 0 ] . exception . mechanism . handled , false ) ;
641
- assert . equal ( sentryData [ 0 ] . exception . mechanism . type , 'onunhandledrejection' ) ;
642
- done ( ) ;
643
- } else {
644
- console . log ( 'Skipping this test in non chrome' ) ;
645
- assert . equal ( true , true ) ;
646
- done ( ) ;
647
- }
648
- }
649
- ) ;
650
- } ) ;
651
-
652
- it ( 'should capture unhandledrejection as string' , function ( done ) {
653
- var iframe = this . iframe ;
654
-
655
- iframeExecute (
656
- iframe ,
657
- done ,
658
- function ( ) {
659
- if ( isChrome ( ) ) {
660
- setTimeout ( function ( ) {
661
- return Promise . reject ( 'test' ) ;
662
- } ) ;
663
- } else {
664
- done ( ) ;
665
- }
666
- } ,
667
- function ( sentryData ) {
668
- if ( debounceAssertEventCount ( sentryData , 1 , done ) ) {
669
- assert . equal ( sentryData [ 0 ] . exception . values [ 0 ] . value , 'test' ) ;
670
- assert . equal ( sentryData [ 0 ] . exception . values [ 0 ] . type , 'UnhandledRejection' ) ;
671
- assert . equal ( sentryData [ 0 ] . exception . values [ 0 ] . stacktrace , undefined ) ;
672
- assert . equal ( sentryData [ 0 ] . exception . mechanism . handled , false ) ;
673
- assert . equal ( sentryData [ 0 ] . exception . mechanism . type , 'onunhandledrejection' ) ;
674
- done ( ) ;
675
- } else {
676
- console . log ( 'Skipping this test in non chrome' ) ;
677
- assert . equal ( true , true ) ;
678
- done ( ) ;
679
- }
680
- }
681
- ) ;
682
- } ) ;
620
+ // it('should capture unhandledrejection with error', function(done) {
621
+ // var iframe = this.iframe;
622
+
623
+ // iframeExecute(
624
+ // iframe,
625
+ // done,
626
+ // function() {
627
+ // if (isChrome()) {
628
+ // setTimeout(function() {
629
+ // return Promise.reject(new Error('test2'));
630
+ // });
631
+ // } else {
632
+ // done();
633
+ // }
634
+ // },
635
+ // function(sentryData) {
636
+ // if (debounceAssertEventCount(sentryData, 1, done)) {
637
+ // assert.equal(sentryData[0].exception.values[0].value, 'test2');
638
+ // assert.equal(sentryData[0].exception.values[0].type, 'Error');
639
+ // assert.isAtLeast(sentryData[0].exception.values[0].stacktrace.frames.length, 1);
640
+ // assert.equal(sentryData[0].exception.mechanism.handled, false);
641
+ // assert.equal(sentryData[0].exception.mechanism.type, 'onunhandledrejection');
642
+ // done();
643
+ // } else {
644
+ // console.log('Skipping this test in non chrome');
645
+ // assert.equal(true, true);
646
+ // done();
647
+ // }
648
+ // }
649
+ // );
650
+ // });
651
+
652
+ // it('should capture unhandledrejection as string', function(done) {
653
+ // var iframe = this.iframe;
654
+
655
+ // iframeExecute(
656
+ // iframe,
657
+ // done,
658
+ // function() {
659
+ // if (isChrome()) {
660
+ // setTimeout(function() {
661
+ // return Promise.reject('test');
662
+ // });
663
+ // } else {
664
+ // done();
665
+ // }
666
+ // },
667
+ // function(sentryData) {
668
+ // if (debounceAssertEventCount(sentryData, 1, done)) {
669
+ // assert.equal(sentryData[0].exception.values[0].value, 'test');
670
+ // assert.equal(sentryData[0].exception.values[0].type, 'UnhandledRejection');
671
+ // assert.equal(sentryData[0].exception.values[0].stacktrace, undefined);
672
+ // assert.equal(sentryData[0].exception.mechanism.handled, false);
673
+ // assert.equal(sentryData[0].exception.mechanism.type, 'onunhandledrejection');
674
+ // done();
675
+ // } else {
676
+ // console.log('Skipping this test in non chrome');
677
+ // assert.equal(true, true);
678
+ // done();
679
+ // }
680
+ // }
681
+ // );
682
+ // });
683
683
684
684
it ( 'should capture exceptions inside setTimeout' , function ( done ) {
685
685
var iframe = this . iframe ;
0 commit comments