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
e580b7d6
...
e580b7d65bd0c9ebdc9af9d436b51243c63e3390
authored
2011-10-09 20:34:55 +0200
by
Nicolas Perriault
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
moved test results rendering to assert.js
1 parent
46210431
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
4 deletions
tests/assert.js
tests/run.js
tests/assert.js
View file @
e580b7d
...
...
@@ -29,5 +29,12 @@ phantom.Casper.extend({
assertEvalEquals
:
function
(
fn
,
expected
,
message
)
{
return
this
.
assertEquals
(
this
.
evaluate
(
fn
),
expected
,
message
);
},
renderResults
:
function
()
{
this
.
echo
(
"=========================================="
);
var
total
=
testResults
.
passed
+
testResults
.
failed
;
this
.
echo
(
total
+
' tests executed, '
+
testResults
.
passed
+
' passed, '
+
testResults
.
failed
+
' failed.'
);
this
.
exit
();
}
});
\ No newline at end of file
...
...
tests/run.js
View file @
e580b7d
...
...
@@ -45,8 +45,5 @@ casper.then(function(self) {
});
casper
.
run
(
function
(
self
)
{
self
.
echo
(
"=========================================="
);
var
total
=
testResults
.
passed
+
testResults
.
failed
;
self
.
echo
(
total
+
' tests executed, '
+
testResults
.
passed
+
' passed, '
+
testResults
.
failed
+
' failed.'
);
self
.
exit
();
self
.
renderResults
();
});
...
...
Please
register
or
sign in
to post a comment