Skip to content

Commit

Permalink
fix #1667 Improving the readability of Jaws test case failures.
Browse files Browse the repository at this point in the history
This commit adds some line breaks in the error message of Jaws test cases
so that it is easier to compare the actual Jaws history with the expected
one.
  • Loading branch information
divdavem committed Aug 23, 2016
1 parent b9a0e3e commit c15731d
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 6 deletions.
2 changes: 1 addition & 1 deletion package.json
Expand Up @@ -41,7 +41,7 @@
"noder-js": "1.6.2"
},
"devDependencies": {
"attester": "2.4.1",
"attester": "2.4.3",
"express": "3.4.8",
"grunt": "0.4.2",
"grunt-contrib-jshint": "0.8.0",
Expand Down
9 changes: 4 additions & 5 deletions src/aria/jsunit/JawsTestCase.js
Expand Up @@ -14,7 +14,6 @@
*/
var Aria = require("../Aria");
var ariaUtilsString = require("../utils/String");
var ariaUtilsJson = require("../utils/Json");

/**
* Class to be extended to create a template test case which checks the behavior with
Expand Down Expand Up @@ -145,13 +144,13 @@ module.exports = Aria.classDefinition({
} else {
message.push('History was not filtered');
}
message.push("JAWS history" + (changed ? ' (filtered)' : '') + ": " + ariaUtilsJson.convertToJsonString(response));
message.push("Expected history: " + ariaUtilsJson.convertToJsonString(expectedOutput));
message.push("JAWS history" + (changed ? ' (filtered)' : '') + ":", "", response, "");
message.push("Expected history:", "", expectedOutput, "");

if (changed) {
message.push("JAWS history (original): " + ariaUtilsJson.convertToJsonString(originalResponse));
message.push("JAWS history (original): ", "", originalResponse, "");
}
message = message.join('.\n') + '.';
message = message.join('\n');

this.assertEquals(response, expectedOutput, message);
this.$callback(callback);
Expand Down

0 comments on commit c15731d

Please sign in to comment.