dwf/rva: adding optional element for DOM output

This commit is contained in:
pivotal
2008-12-04 11:43:22 -08:00
parent cc164257a7
commit e1cafe7881
4 changed files with 95 additions and 82 deletions

7
test/bootstrap.js vendored
View File

@@ -658,7 +658,7 @@ var testJSONReporter = function () {
});
});
runner.reporter = JasmineReporters.JSON();
runner.reporter = JasmineReporters.JSON('json_reporter_results');
reporter.test((runner.reporter !== undefined),
"Runner's reporter is undefined");
@@ -670,7 +670,10 @@ var testJSONReporter = function () {
expectedJSONString = '{"totalCount": 1, "passedCount": 1, "failedCount": 0, "results": [{"totalCount": 1, "passedCount": 1, "failedCount": 0, "results": [{"totalCount": 1, "passedCount": 1, "failedCount": 0, "results": [{"passed": true, "message": "Passed."}], "description": "should be a test"}], "description": "one suite description"}], "description": "All Jasmine Suites"}';
setTimeout(function() {
reporter.test((runner.reporter.report() === expectedJSONString),
'Jasmine Reporter does not have the expected report, has: ' + runner.reporter.report());
'Jasmine Reporter does not have the expected report, has: ' + runner.reporter.report());
reporter.test((document.getElementById('json_reporter_results').innerHTML === expectedJSONString),
'Jasmine Reporter did not output the string to the DOM');
}, 500);
}