Commit ce3860f5 ce3860f583b30375ff91c16cb6527d59a3b60c0d by Nicolas Perriault

WiP

1 parent bf0354c3
......@@ -1126,6 +1126,7 @@ Tester.prototype.testEquals = Tester.prototype.testEqual = function testEquals(v
*/
Tester.prototype.uncaughtError = function uncaughtError(error, file, line, backtrace) {
"use strict";
// XXX: this is NOT an assertion scratch that
return this.processAssertionResult({
success: false,
type: "uncaughtError",
......
......@@ -32,6 +32,7 @@ casper.test.begin('XUnitReporter() can hold test suites', function suite() {
this.assertExists('testsuites[duration]');
this.assertExists('testsuite[name="foo"][package="foo"]');
this.assertExists('testsuite[name="bar"][package="bar"]');
throw new Error('plop')
this.done(4);
});
......@@ -72,6 +73,6 @@ casper.test.begin('XUnitReporter() can handle a failed test', function suite() {
xunit.setResults(results);
casper.start().setContent(xunit.getXML());
this.assertExists('testsuite[name="foo"][package="foo"][tests="1"][failures="1"] testcase[name="footext"] failure[type="footype"]');
casper.test.done(1);
this.assertEquals(casper.getElementInfo('failure[type="footype"]').text, 'footext');
casper.test.done(2);
});
......