Commit ce3860f5 ce3860f583b30375ff91c16cb6527d59a3b60c0d by Nicolas Perriault

WiP

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