Skip to content

Commit 9e93efc

Browse files
theearthman81dasilvacontin
authored andcommittedMay 25, 2016
Make HTML reporter failure/passed links preventDefault to avoid SPA's hash navigation (#2119)
1 parent 6d24063 commit 9e93efc

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed
 

‎lib/reporters/html.js

+4-2
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,8 @@ function HTML(runner) {
8080
}
8181

8282
// pass toggle
83-
on(passesLink, 'click', function() {
83+
on(passesLink, 'click', function(evt) {
84+
evt.preventDefault();
8485
unhide();
8586
var name = (/pass/).test(report.className) ? '' : ' pass';
8687
report.className = report.className.replace(/fail|pass/g, '') + name;
@@ -90,7 +91,8 @@ function HTML(runner) {
9091
});
9192

9293
// failure toggle
93-
on(failuresLink, 'click', function() {
94+
on(failuresLink, 'click', function(evt) {
95+
evt.preventDefault();
9496
unhide();
9597
var name = (/fail/).test(report.className) ? '' : ' fail';
9698
report.className = report.className.replace(/fail|pass/g, '') + name;

0 commit comments

Comments
 (0)
Please sign in to comment.