Commit 4f157b94 4f157b948fd0cd2a4ef17dc92c211ab254d9b669 by Nicolas Perriault

updated jsdoc

1 parent 7e5b87bb
Showing 1 changed file with 25 additions and 1 deletions
...@@ -891,6 +891,13 @@ ...@@ -891,6 +891,13 @@
891 'INFO_BAR': { fg: 'cyan', bold: true } 891 'INFO_BAR': { fg: 'cyan', bold: true }
892 }; 892 };
893 893
894 /**
895 * Adds a style to provided text.
896 *
897 * @params String text
898 * @params String styleName
899 * @return String
900 */
894 this.colorize = function(text, styleName) { 901 this.colorize = function(text, styleName) {
895 if (styleName in styles) { 902 if (styleName in styles) {
896 return this.format(text, styles[styleName]); 903 return this.format(text, styles[styleName]);
...@@ -898,6 +905,13 @@ ...@@ -898,6 +905,13 @@
898 return text; 905 return text;
899 }; 906 };
900 907
908 /**
909 * Formats a text using a style declaration object.
910 *
911 * @param String text
912 * @param Object style
913 * @return String
914 */
901 this.format = function(text, style) { 915 this.format = function(text, style) {
902 if (typeof style !== "object") { 916 if (typeof style !== "object") {
903 return text; 917 return text;
...@@ -1164,6 +1178,9 @@ ...@@ -1164,6 +1178,9 @@
1164 1178
1165 /** 1179 /**
1166 * Adds a successful test result 1180 * Adds a successful test result
1181 *
1182 * @param String classname
1183 * @param String name
1167 */ 1184 */
1168 this.addSuccess = function(classname, name) { 1185 this.addSuccess = function(classname, name) {
1169 xml.appendChild(node('testcase', { 1186 xml.appendChild(node('testcase', {
...@@ -1174,6 +1191,11 @@ ...@@ -1174,6 +1191,11 @@
1174 1191
1175 /** 1192 /**
1176 * Adds a failed test result 1193 * Adds a failed test result
1194 *
1195 * @param String classname
1196 * @param String name
1197 * @param String message
1198 * @param String type
1177 */ 1199 */
1178 this.addFailure = function(classname, name, message, type) { 1200 this.addFailure = function(classname, name, message, type) {
1179 var fnode = node('testcase', { 1201 var fnode = node('testcase', {
...@@ -1189,7 +1211,9 @@ ...@@ -1189,7 +1211,9 @@
1189 }; 1211 };
1190 1212
1191 /** 1213 /**
1192 * Retrieves generated XML object. 1214 * Retrieves generated XML object - actually an HTMLElement.
1215 *
1216 * @return HTMLElement
1193 */ 1217 */
1194 this.getXML = function() { 1218 this.getXML = function() {
1195 return xml; 1219 return xml;
......