@@ -661,11 +661,13 @@ describe('integration', function () {
661661 Raven . _breadcrumbs = [ ] ;
662662 history . pushState ( { } , '' , '/foo' ) ;
663663 history . pushState ( { } , '' , '/bar' ) ;
664+ history . pushState ( { } , '' , { } ) ; // pushState calls toString on non-string args
665+ history . pushState ( { } , '' , null ) ; // does nothing / no-op
664666
665667 // can't call history.back() because it will change url of parent document
666668 // (e.g. document running mocha) ... instead just "emulate" a back button
667669 // press by calling replaceState + onpopstate manually
668- history . replaceState ( { } , '' , '/foo ' ) ;
670+ history . replaceState ( { } , '' , '/bar ' ) ;
669671 window . onpopstate ( ) ;
670672 done ( ) ;
671673 } ,
@@ -675,10 +677,11 @@ describe('integration', function () {
675677 from ,
676678 to ;
677679
678- assert . equal ( breadcrumbs . length , 3 ) ;
680+ assert . equal ( breadcrumbs . length , 4 ) ;
679681 assert . equal ( breadcrumbs [ 0 ] . category , 'navigation' ) ; // (start) => foo
680682 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)
682685
683686 // assert end of string because PhantomJS uses full system path
684687 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 () {
687690 assert . ok ( / \/ f o o $ / . test ( breadcrumbs [ 1 ] . data . from ) , '\'from\' url is incorrect' ) ;
688691 assert . ok ( / \/ b a r $ / . test ( breadcrumbs [ 1 ] . data . to ) , '\'to\' url is incorrect' ) ;
689692
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' ) ;
692698 }
693699 ) ;
694700 } ) ;
0 commit comments