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
def87690
...
def87690b80948fe2b15e6d6d1ad43ca5051c664
authored
2012-02-15 22:22:09 +0100
by
Nicolas Perriault
Browse Files
Options
Browse Files
Tag
Download
Plain Diff
Merge remote-tracking branch 'cwinters/master'; commit '
0643e910
' into cwinters-52
2 parents
20b5c47d
0643e910
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
4 deletions
modules/tester.js
modules/tester.js
View file @
def8769
...
...
@@ -146,9 +146,10 @@ var Tester = function(casper, options) {
*
* @param Function fn A function to be evaluated in remote DOM
* @param String message Test description
* @param Object context Object containing the parameters to inject into the function
*/
this
.
assertEval
=
function
assertEval
(
fn
,
message
)
{
return
this
.
assert
(
casper
.
evaluate
(
fn
),
message
);
this
.
assertEval
=
function
assertEval
(
fn
,
message
,
context
)
{
return
this
.
assert
(
casper
.
evaluate
(
fn
,
context
),
message
);
};
/**
...
...
@@ -158,9 +159,10 @@ var Tester = function(casper, options) {
* @param Function fn The function to be evaluated in remote DOM
* @param Boolean expected The expected value
* @param String message Test description
* @param Object context Object containing the parameters to inject into the function
*/
this
.
assertEvalEquals
=
function
assertEvalEquals
(
fn
,
expected
,
message
)
{
return
this
.
assertEquals
(
casper
.
evaluate
(
fn
),
expected
,
message
);
this
.
assertEvalEquals
=
function
assertEvalEquals
(
fn
,
expected
,
message
,
context
)
{
return
this
.
assertEquals
(
casper
.
evaluate
(
fn
,
context
),
expected
,
message
);
};
/**
...
...
@@ -174,6 +176,7 @@ var Tester = function(casper, options) {
return
this
.
assert
(
casper
.
exists
(
selector
),
message
);
};
/**
* Asserts that current HTTP status is the one passed as argument.
*
...
...
Please
register
or
sign in
to post a comment