diff options
Diffstat (limited to 'xstatic/pkg/jasmine/data/jasmine-html.js')
-rwxr-xr-x | xstatic/pkg/jasmine/data/jasmine-html.js | 22 |
1 files changed, 17 insertions, 5 deletions
diff --git a/xstatic/pkg/jasmine/data/jasmine-html.js b/xstatic/pkg/jasmine/data/jasmine-html.js index 898108b..bee5a04 100755 --- a/xstatic/pkg/jasmine/data/jasmine-html.js +++ b/xstatic/pkg/jasmine/data/jasmine-html.js @@ -1,5 +1,5 @@ /* -Copyright (c) 2008-2014 Pivotal Labs +Copyright (c) 2008-2015 Pivotal Labs Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the @@ -40,6 +40,7 @@ jasmineRequire.HtmlReporter = function(j$) { createElement = options.createElement, createTextNode = options.createTextNode, onRaiseExceptionsClick = options.onRaiseExceptionsClick || function() {}, + addToExistingQueryString = options.addToExistingQueryString || defaultQueryString, timer = options.timer || noopTimer, results = [], specsExecuted = 0, @@ -220,6 +221,9 @@ jasmineRequire.HtmlReporter = function(j$) { if(noExpectations(resultNode.result)) { specDescription = 'SPEC HAS NO EXPECTATIONS ' + specDescription; } + if(resultNode.result.status === 'pending' && resultNode.result.pendingReason !== '') { + specDescription = specDescription + ' PENDING WITH MESSAGE: ' + resultNode.result.pendingReason; + } specListNode.appendChild( createDom('li', { className: resultNode.result.status, @@ -267,7 +271,7 @@ jasmineRequire.HtmlReporter = function(j$) { function clearPrior() { // return the reporter var oldReporter = find(''); - + if(oldReporter) { getContainer().removeChild(oldReporter); } @@ -306,7 +310,11 @@ jasmineRequire.HtmlReporter = function(j$) { } function specHref(result) { - return '?spec=' + encodeURIComponent(result.fullName); + return addToExistingQueryString('spec', result.fullName); + } + + function defaultQueryString(key, value) { + return '?' + key + '=' + value; } function setMenuModeTo(mode) { @@ -358,10 +366,14 @@ jasmineRequire.ResultsNode = function() { jasmineRequire.QueryString = function() { function QueryString(options) { - this.setParam = function(key, value) { + this.navigateWithNewParam = function(key, value) { + options.getWindowLocation().search = this.fullStringWithNewParam(key, value); + }; + + this.fullStringWithNewParam = function(key, value) { var paramMap = queryStringToParamMap(); paramMap[key] = value; - options.getWindowLocation().search = toQueryString(paramMap); + return toQueryString(paramMap); }; this.getParam = function(key) { |