output both path to json mismatches to make debugging test failures easier

This commit is contained in:
Dane Springmeyer 2013-03-01 15:08:29 -05:00
parent e8566e817e
commit 8efc1c5d5e

View File

@ -43,7 +43,7 @@ helper.files('rendering', 'mml', function(file) {
*/
fs.writeFileSync(actual,JSON.stringify(actual_json,null,4));
fs.writeFileSync(expected,JSON.stringify(expected_json,null,4));
throw new Error('failed: ' + actual + ' not equal to expected: ' + result);
throw new Error('failed: xml ' + result + ' in json form does not match expected result:\n' + actual + ' (actual)\n' + expected + ' (expected)');
} else {
// cleanup any actual renders that no longer fail
try {