Permalink
Browse files

Bumping built distribution

  • Loading branch information...
1 parent eb1bd25 commit e1e49e8292c6ab58019f6802f2a4407ba32d35f4 @sheelc sheelc committed Jun 28, 2014
Showing with 14 additions and 0 deletions.
  1. +10 −0 lib/jasmine-core/jasmine-html.js
  2. +4 −0 lib/jasmine-core/jasmine.js
View
10 lib/jasmine-core/jasmine-html.js
@@ -49,6 +49,7 @@ jasmineRequire.HtmlReporter = function(j$) {
symbols;
this.initialize = function() {
+ clearPrior();
htmlReporterMain = createDom('div', {className: 'jasmine_html-reporter'},
createDom('div', {className: 'banner'},
createDom('a', {className: 'title', href: 'http://jasmine.github.io/', target: '_blank'}),
@@ -249,6 +250,15 @@ jasmineRequire.HtmlReporter = function(j$) {
return getContainer().querySelector('.jasmine_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);
View
4 lib/jasmine-core/jasmine.js
@@ -687,6 +687,10 @@ getJasmineRequireObj().Env = function(j$) {
};
this.expect = function(actual) {
+ if (!currentSpec) {
+ throw new Error('\'expect\' was used when there was no current spec, this could be because an asynchronous test timed out');
+ }
+
return currentSpec.expect(actual);
};

0 comments on commit e1e49e8

Please sign in to comment.