Skip to content

Commit

Permalink
preventDefault on html reporter failure/passed links to stop browser …
Browse files Browse the repository at this point in the history
…url updating
  • Loading branch information
theearthman81 committed Feb 18, 2016
1 parent 0543798 commit 5307de5
Show file tree
Hide file tree
Showing 2 changed files with 3,867 additions and 3,841 deletions.
6 changes: 4 additions & 2 deletions lib/reporters/html.js
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,8 @@ function HTML(runner) {
}

// pass toggle
on(passesLink, 'click', function() {
on(passesLink, 'click', function(evt) {
evt.preventDefault();
unhide();
var name = (/pass/).test(report.className) ? '' : ' pass';
report.className = report.className.replace(/fail|pass/g, '') + name;
Expand All @@ -90,7 +91,8 @@ function HTML(runner) {
});

// failure toggle
on(failuresLink, 'click', function() {
on(failuresLink, 'click', function(evt) {
evt.preventDefault();
unhide();
var name = (/fail/).test(report.className) ? '' : ' fail';
report.className = report.className.replace(/fail|pass/g, '') + name;
Expand Down

0 comments on commit 5307de5

Please sign in to comment.