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
9dd655b4
...
9dd655b4a5860d0d59da6405b11d781c8644069c
authored
2012-01-11 19:04:39 +0100
by
Nicolas Perriault
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
added line nb information on test failure error message
1 parent
0b128997
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
4 deletions
modules/tester.js
modules/tester.js
View file @
9dd655b
...
...
@@ -412,13 +412,15 @@ var Tester = function(casper, options) {
}
casper
.
echo
(
f
(
"\nDetails for the %d failed test%s:\n"
,
failures
.
length
,
failures
.
length
>
1
?
"s"
:
""
),
"PARAMETER"
);
failures
.
forEach
(
function
(
failure
)
{
casper
.
echo
(
f
(
'In %s:'
,
failure
.
file
));
var
message
;
var
message
,
line
;
if
(
utils
.
isType
(
failure
.
message
,
"object"
)
&&
failure
.
message
.
stack
)
{
line
=
failure
.
message
.
line
?
failure
.
message
.
line
:
0
;
message
=
failure
.
message
.
stack
;
}
else
{
line
=
0
;
message
=
failure
.
message
;
}
casper
.
echo
(
f
(
'In %s:%d'
,
failure
.
file
,
line
));
casper
.
echo
(
f
(
' %s'
,
message
),
"COMMENT"
);
});
};
...
...
@@ -511,8 +513,6 @@ var Tester = function(casper, options) {
try
{
this
.
exec
(
testFile
);
}
catch
(
e
)
{
// TODO: better formatting of aborted failing suite
// TODO: add exception trace (?)
this
.
fail
(
e
);
this
.
done
();
}
...
...
Please
register
or
sign in
to post a comment