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
4f157b94
...
4f157b948fd0cd2a4ef17dc92c211ab254d9b669
authored
2011-10-16 16:00:21 +0200
by
Nicolas Perriault
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
updated jsdoc
1 parent
7e5b87bb
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
25 additions
and
1 deletions
casper.js
casper.js
View file @
4f157b9
...
...
@@ -891,6 +891,13 @@
'INFO_BAR'
:
{
fg
:
'cyan'
,
bold
:
true
}
};
/**
* Adds a style to provided text.
*
* @params String text
* @params String styleName
* @return String
*/
this
.
colorize
=
function
(
text
,
styleName
)
{
if
(
styleName
in
styles
)
{
return
this
.
format
(
text
,
styles
[
styleName
]);
...
...
@@ -898,6 +905,13 @@
return
text
;
};
/**
* Formats a text using a style declaration object.
*
* @param String text
* @param Object style
* @return String
*/
this
.
format
=
function
(
text
,
style
)
{
if
(
typeof
style
!==
"object"
)
{
return
text
;
...
...
@@ -1164,6 +1178,9 @@
/**
* Adds a successful test result
*
* @param String classname
* @param String name
*/
this
.
addSuccess
=
function
(
classname
,
name
)
{
xml
.
appendChild
(
node
(
'testcase'
,
{
...
...
@@ -1174,6 +1191,11 @@
/**
* Adds a failed test result
*
* @param String classname
* @param String name
* @param String message
* @param String type
*/
this
.
addFailure
=
function
(
classname
,
name
,
message
,
type
)
{
var
fnode
=
node
(
'testcase'
,
{
...
...
@@ -1189,7 +1211,9 @@
};
/**
* Retrieves generated XML object.
* Retrieves generated XML object - actually an HTMLElement.
*
* @return HTMLElement
*/
this
.
getXML
=
function
()
{
return
xml
;
...
...
Please
register
or
sign in
to post a comment