Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

clear prior test results on multiple inits

  • Loading branch information...
commit 07cce0b1d1122e73f64bc7314bc7c6a564b8e1e1 1 parent 6750559
@plukevdh plukevdh authored
Showing with 10 additions and 0 deletions.
  1. +10 −0 src/html/HtmlReporter.js
View
10 src/html/HtmlReporter.js
@@ -20,6 +20,7 @@ jasmineRequire.HtmlReporter = function(j$) {
symbols;
this.initialize = function() {
+ clearPrior();
htmlReporterMain = createDom('div', {className: 'html-reporter'},
createDom('div', {className: 'banner'},
createDom('a', {className: 'title', href: 'http://jasmine.github.io/', target: '_blank'}),
@@ -220,6 +221,15 @@ jasmineRequire.HtmlReporter = function(j$) {
return getContainer().querySelector('.html-reporter ' + selector);
}
+ function clearPrior() {
+ // return the reporter
+ var oldReporter = find('');
+
+ if(oldReporter) {
+ getContainer().removeChild(oldReporter);
+ }
+ }
+
function createDom(type, attrs, childrenVarArgs) {
var el = createElement(type);
Please sign in to comment.
Something went wrong with that request. Please try again.