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
2f1993f1
...
2f1993f1132fdaa87129db9780d34a07b34dd61e
authored
2012-12-19 16:17:09 +0100
by
Nicolas Perriault
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
fixed broken `--fail-fast` option creating an endless loop on error
1 parent
f7a3d5a7
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
11 additions
and
3 deletions
CHANGELOG.md
modules/casper.js
modules/tester.js
CHANGELOG.md
View file @
2f1993f
...
...
@@ -4,6 +4,7 @@ CasperJS Changelog
XXXX-XX-XX, v1.0.0
------------------
-
fixed
[
#215
](
https://github.com/n1k0/casperjs/issues/215
)
- fixed broken
`--fail-fast`
option creating an endless loop on error
-
fixed
`Tester.renderFailureDetails()`
which couldn't print failure details correctly in certain circumstances
-
fixed
`Casper.getHTML()`
wasn't retrieving active frame contents when using
`Casper.withFrame()`
-
merged PR
[
#322
](
https://github.com/n1k0/casperjs/pull/322
)
- Support number in
`Casper.withFrame()`
...
...
modules/casper.js
View file @
2f1993f
...
...
@@ -158,7 +158,7 @@ var Casper = function Casper(options) {
this
.
on
(
'error'
,
function
(
msg
,
backtrace
)
{
if
(
msg
===
this
.
test
.
SKIP_MESSAGE
)
{
return
this
.
warn
(
f
(
'--fail-fast: aborted remaining tests in "%s"'
,
this
.
test
.
currentTestFile
))
;
return
;
}
var
c
=
this
.
getColorizer
();
var
match
=
/^
(
.*
)
: __mod_error
(
.*
)
::
(
.*
)
/
.
exec
(
msg
);
...
...
modules/tester.js
View file @
2f1993f
...
...
@@ -141,8 +141,13 @@ var Tester = function Tester(casper, options) {
if
(
!
phantom
.
casperTest
)
{
return
;
}
if
(
msg
===
this
.
test
.
SKIP_MESSAGE
)
{
this
.
warn
(
f
(
'--fail-fast: aborted remaining tests in "%s"'
,
this
.
test
.
currentTestFile
));
this
.
test
.
currentSuiteNum
++
;
return
this
.
test
.
done
();
}
var
line
=
0
;
if
(
!
utils
.
isString
(
msg
)
&&
msg
.
indexOf
(
this
.
SKIP_MESSAGE
)
===
-
1
)
{
if
(
!
utils
.
isString
(
msg
))
{
try
{
line
=
backtrace
[
0
].
line
;
}
catch
(
e
)
{}
...
...
@@ -152,7 +157,9 @@ var Tester = function Tester(casper, options) {
});
this
.
casper
.
on
(
'step.error'
,
function
onStepError
(
e
)
{
this
.
test
.
uncaughtError
(
e
,
this
.
test
.
currentTestFile
);
if
(
e
.
message
!==
this
.
test
.
SKIP_MESSAGE
)
{
this
.
test
.
uncaughtError
(
e
,
this
.
test
.
currentTestFile
);
}
this
.
test
.
done
();
});
};
...
...
Please
register
or
sign in
to post a comment