Skip to content
Toggle navigation
Toggle navigation
This project
Loading...
Sign in
John McEleney
/
casperjs
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Network
Create a new issue
Builds
Commits
Issue Boards
Files
Commits
Network
Compare
Branches
Tags
Commit
ce3860f5
...
ce3860f583b30375ff91c16cb6527d59a3b60c0d
authored
2012-12-19 12:16:59 +0100
by
Nicolas Perriault
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
WiP
1 parent
bf0354c3
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
2 deletions
modules/tester.js
tests/suites/xunit.js
modules/tester.js
View file @
ce3860f
...
...
@@ -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"
,
...
...
tests/suites/xunit.js
View file @
ce3860f
...
...
@@ -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
);
});
...
...
Please
register
or
sign in
to post a comment