Skip to content

Commit

Permalink
Get interface name list from collection (#2343)
Browse files Browse the repository at this point in the history
Get interface name list from collection; closes #2317
  • Loading branch information
ScottFreeCode authored and boneskull committed Jul 1, 2016
1 parent 96d9e06 commit 468f110
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions bin/_mocha
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ var program = require('commander'),
exists = fs.existsSync || path.existsSync,
Mocha = require('../'),
utils = Mocha.utils,
interfaceNames = Object.keys(Mocha.interfaces),
join = path.join,
cwd = process.cwd(),
getOptions = require('./options'),
Expand Down Expand Up @@ -74,7 +75,7 @@ program
.option('-r, --require <name>', 'require the given module')
.option('-s, --slow <ms>', '"slow" test threshold in milliseconds [75]')
.option('-t, --timeout <ms>', 'set test-case timeout in milliseconds [2000]')
.option('-u, --ui <name>', 'specify user-interface (bdd|tdd|exports)', 'bdd')
.option('-u, --ui <name>', 'specify user-interface (' + interfaceNames.join('|') + ')', 'bdd')
.option('-w, --watch', 'watch files for changes')
.option('--check-leaks', 'check for global variable leaks')
.option('--full-trace', 'display the full stack trace')
Expand Down Expand Up @@ -156,10 +157,9 @@ program.on('reporters', function(){

program.on('interfaces', function(){
console.log('');
console.log(' bdd');
console.log(' tdd');
console.log(' qunit');
console.log(' exports');
interfaceNames.forEach(function(interfaceName) {
console.log(' ' + interfaceName);
});
console.log('');
process.exit();
});
Expand Down

0 comments on commit 468f110

Please sign in to comment.