@@ -661,11 +661,13 @@ describe('integration', function () {
661
661
Raven . _breadcrumbs = [ ] ;
662
662
history . pushState ( { } , '' , '/foo' ) ;
663
663
history . pushState ( { } , '' , '/bar' ) ;
664
+ history . pushState ( { } , '' , { } ) ; // pushState calls toString on non-string args
665
+ history . pushState ( { } , '' , null ) ; // does nothing / no-op
664
666
665
667
// can't call history.back() because it will change url of parent document
666
668
// (e.g. document running mocha) ... instead just "emulate" a back button
667
669
// press by calling replaceState + onpopstate manually
668
- history . replaceState ( { } , '' , '/foo ' ) ;
670
+ history . replaceState ( { } , '' , '/bar ' ) ;
669
671
window . onpopstate ( ) ;
670
672
done ( ) ;
671
673
} ,
@@ -675,10 +677,11 @@ describe('integration', function () {
675
677
from ,
676
678
to ;
677
679
678
- assert . equal ( breadcrumbs . length , 3 ) ;
680
+ assert . equal ( breadcrumbs . length , 4 ) ;
679
681
assert . equal ( breadcrumbs [ 0 ] . category , 'navigation' ) ; // (start) => foo
680
682
assert . equal ( breadcrumbs [ 1 ] . category , 'navigation' ) ; // foo => bar
681
- assert . equal ( breadcrumbs [ 2 ] . category , 'navigation' ) ; // bar => foo (back button)
683
+ assert . equal ( breadcrumbs [ 2 ] . category , 'navigation' ) ; // bar => [object%20Object]
684
+ assert . equal ( breadcrumbs [ 3 ] . category , 'navigation' ) ; // [object%20Object] => bar(back button)
682
685
683
686
// assert end of string because PhantomJS uses full system path
684
687
assert . ok ( / \/ t e s t \/ i n t e g r a t i o n \/ f r a m e \. h t m l $ / . test ( Raven . _breadcrumbs [ 0 ] . data . from ) , '\'from\' url is incorrect' ) ;
@@ -687,8 +690,11 @@ describe('integration', function () {
687
690
assert . ok ( / \/ f o o $ / . test ( breadcrumbs [ 1 ] . data . from ) , '\'from\' url is incorrect' ) ;
688
691
assert . ok ( / \/ b a r $ / . test ( breadcrumbs [ 1 ] . data . to ) , '\'to\' url is incorrect' ) ;
689
692
690
- assert . ok ( / \/ b a r / . test ( breadcrumbs [ 2 ] . data . from ) , '\'from\' url is incorrect' ) ;
691
- assert . ok ( / \/ f o o / . test ( breadcrumbs [ 2 ] . data . to ) , '\'to\' url is incorrect' ) ;
693
+ assert . ok ( / \/ b a r $ / . test ( breadcrumbs [ 2 ] . data . from ) , '\'from\' url is incorrect' ) ;
694
+ assert . ok ( / \[ o b j e c t O b j e c t \] $ / . test ( breadcrumbs [ 2 ] . data . to ) , '\'to\' url is incorrect' ) ;
695
+
696
+ assert . ok ( / \[ o b j e c t O b j e c t \] $ / . test ( breadcrumbs [ 3 ] . data . from ) , '\'from\' url is incorrect' ) ;
697
+ assert . ok ( / \/ b a r / . test ( breadcrumbs [ 3 ] . data . to ) , '\'to\' url is incorrect' ) ;
692
698
}
693
699
) ;
694
700
} ) ;
0 commit comments