diff --git a/lib/cli/run-option-metadata.js b/lib/cli/run-option-metadata.js index a897570186..0838e6050c 100644 --- a/lib/cli/run-option-metadata.js +++ b/lib/cli/run-option-metadata.js @@ -28,6 +28,7 @@ exports.types = { 'bail', 'check-leaks', 'color', + 'delay', 'diff', 'exit', 'forbid-only', @@ -35,9 +36,12 @@ exports.types = { 'full-trace', 'growl', 'inline-diffs', + 'interfaces', 'invert', 'no-colors', 'recursive', + 'reporters', + 'sort', 'watch' ], number: ['retries', 'slow', 'timeout'], diff --git a/test/node-unit/cli/run.spec.js b/test/node-unit/cli/run.spec.js new file mode 100644 index 0000000000..6dfe5aaa4f --- /dev/null +++ b/test/node-unit/cli/run.spec.js @@ -0,0 +1,24 @@ +'use strict'; + +const {builder} = require('../../../lib/cli/run'); +const {types} = require('../../../lib/cli/run-option-metadata'); + +describe('command', function() { + describe('run', function() { + describe('builder', function() { + const IGNORED_OPTIONS = new Set(['help', 'version']); + const options = builder(require('yargs')).getOptions(); + ['number', 'string', 'boolean', 'array'].forEach(type => { + describe(`${type} type`, function() { + Array.from(new Set(options[type])).forEach(option => { + if (!IGNORED_OPTIONS.has(option)) { + it(`should include option ${option}`, function() { + expect(types[type], 'to contain', option); + }); + } + }); + }); + }); + }); + }); +});