瀏覽代碼

misc jsdocs

Kyle P Davis 12 年之前
父節點
當前提交
5429138db4
共有 4 個文件被更改,包括 16 次插入 和 8 次删除
  1. 5 0
      lib/index.js
  2. 4 2
      lib/reporter.js
  3. 5 6
      lib/runner.js
  4. 2 0
      main.js

+ 5 - 0
lib/index.js

@@ -1,4 +1,9 @@
 "use strict";
+
+/**
+ * @namespace benchmarksman
+ * @module benchmarksman
+ */
 module.exports = {
 	reporter: require("./reporter"),
 	runner: require("./runner"),

+ 4 - 2
lib/reporter.js

@@ -1,8 +1,10 @@
 "use strict";
 
 /**
- * Reporter module for benchmark.js instances.
- * @private
+ * Reporter for benchmarks.
+ * @method reporter
+ * @namespace benchmarksman
+ * @param {Benchmark} bench  The `benchmark.js` test
  */
 module.exports = function reporter(bench){
 	var ctx = this;

+ 5 - 6
lib/runner.js

@@ -1,16 +1,15 @@
 "use strict";
-
-/**
- * Create benchmarks defined similarly to tests in the mocha exports UI
- */
 var path = require("path"),
 	benchmark = require("benchmark"),
 	reporter = require("./reporter");
 
 /**
- * Runner for benchmarks defined similarly to tests in the mocha exports UI
+ * Runner for benchmarks.
+ * @method runner
  * @param {Object|Array|String} tests  The tests walk and execute
- * @private
+ *    if {Object}, should be in format similar to mocha `exports` UI
+ *    if {String}, should be reference to file that exports tests
+ *    if {Array}, should be list of tests
  */
 module.exports = function runner(tests) { //jshint maxcomplexity:19
 	var ctx = this && this !== global && this !== require("./") ? this : {};

+ 2 - 0
main.js

@@ -4,6 +4,8 @@ var lib = require("./lib/"),
 
 /**
  * Main command handler if this is run directly
+ * @namespace benchmarksman
+ * @method main
  */
 module.exports = function main() {
 	var pkg = require("./package.json"),