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
0643e910
...
0643e910b4a440d53612701f75e0fac8e330b39d
authored
2012-02-15 15:38:58 -0500
by
Chris Winters
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
passthru context from tester.assertEval and tester.assertEvalEquals to casper.evaluate
1 parent
087f726f
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
4 deletions
modules/tester.js
modules/tester.js
View file @
0643e91
...
...
@@ -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