Permalink
Browse files

Added --interfaces and --reporters

  • Loading branch information...
1 parent 7f42301 commit 6f0e97e05c858d105957df5c1948ced93305cd94 @tj tj committed Nov 24, 2011
Showing with 16 additions and 9 deletions.
  1. +16 −9 bin/mocha
View
@@ -37,28 +37,35 @@ program
.option('-C, --no-colors', 'force disabling of colors')
.option('-c, --colors', 'force enabling of colors')
.option('-G, --growl', 'enable growl support')
+ .option('--interfaces', 'display available interfaces')
+ .option('--reporters', 'display available reporters')
-// report help
+// --reporters
-program.on('--help', function(){
- console.log(' Reporters:');
- console.log('');
+program.on('reporters', function(){
+ console.log();
console.log(' dot - dot matrix');
console.log(' doc - html documentation');
+ console.log(' spec - hierarchical spec list');
console.log(' json - single json object');
console.log(' progress - progress bar');
console.log(' list - spec-style listing');
console.log(' tap - test-anything-protocol');
console.log(' landing - unicode landing strip');
console.log(' json-stream - newline delimited json events');
- console.log('');
+ console.log();
+ process.exit();
+});
+
+// --interfaces
- console.log(' Interfaces:');
+program.on('interfaces', function(){
console.log('');
- console.log(' bdd - describe() / it()');
- console.log(' tdd - suite() / test()');
- console.log(' exports - module.exports');
+ console.log(' bdd');
+ console.log(' tdd');
+ console.log(' exports');
console.log('');
+ process.exit();
});
// -r, --require

0 comments on commit 6f0e97e

Please sign in to comment.