Skip to content
This repository has been archived by the owner on Aug 1, 2024. It is now read-only.

Commit

Permalink
Expose new getResultsAsJson in the test runner.
Browse files Browse the repository at this point in the history
Also quote properties so that they do not get obfuscated in compiled mode.

RELNOTES: None

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=147667178
  • Loading branch information
dankurka authored and concavelenz committed Feb 17, 2017
1 parent 71c79a7 commit 7744b75
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 3 deletions.
2 changes: 2 additions & 0 deletions closure/goog/testing/jsunit.js
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,8 @@ goog.define('goog.testing.jsunit.AUTO_RUN_DELAY_IN_MS', 500);
goog.exportSymbol('G_testRunner.setStrict', tr.setStrict);
goog.exportSymbol('G_testRunner.logTestFailure', tr.logTestFailure);
goog.exportSymbol('G_testRunner.getTestResults', tr.getTestResults);
goog.exportSymbol(
'G_testRunner.getTestResultsAsJson', tr.getTestResultsAsJson);

// Export debug as a global function for JSUnit compatibility. This just
// calls log on the current test case.
Expand Down
6 changes: 3 additions & 3 deletions closure/goog/testing/testcase.js
Original file line number Diff line number Diff line change
Expand Up @@ -1840,8 +1840,8 @@ goog.testing.TestCase.Error.prototype.toString = function() {
*/
goog.testing.TestCase.Error.prototype.toObject_ = function() {
return {
source: this.source,
message: this.message,
stacktrace: this.stack || ''
'source': this.source,
'message': this.message,
'stacktrace': this.stack || ''
};
};
2 changes: 2 additions & 0 deletions closure/goog/testing/testrunner.js
Original file line number Diff line number Diff line change
Expand Up @@ -436,3 +436,5 @@ goog.testing.TestRunner.prototype.getTestResults = function() {
}
return null;
};


0 comments on commit 7744b75

Please sign in to comment.