Option
|
Option |
9 |
#constructor
|
Option#constructor |
4 |
should work with string argument
|
- |
|
should set default type boolean
|
- |
|
should work without any arguments
|
- |
|
should throw with invalid type
|
- |
|
#requiresValue
|
Option#requiresValue |
2 |
should return false for boolean options
|
- |
|
should return true for any other type
|
- |
|
#parsedValue
|
Option#parsedValue |
3 |
should return parsed number value
|
- |
|
should return null if a number cannot be parsed
|
- |
|
should return original value for any other type
|
- |
|
Parser
|
Parser |
26 |
test/Parser.spec.js |
- |
|
#constructor
|
Parser#constructor |
6 |
should create an instance of emitter
|
- |
|
should store parser options
|
- |
|
should set default value for options.stopParsing
|
- |
|
should cast options.options to option
|
- |
|
should register aliases
|
- |
|
should work without options
|
- |
|
#_addNonOption
|
Parser#_addNonOption |
#_addNotHandled
|
Parser#_addNotHandled |
#_addIgnored
|
Parser#_addIgnored |
#_addOption
|
Parser#_addOption |
2 |
should set option value
|
- |
|
should override on multiple values
|
- |
|
#_endExpectValue
|
Parser#_endExpectValue |
1 |
should add any args that expect values
|
- |
|
#_parseArg
|
Parser#_parseArg |
14 |
should add ignored args if stopped
|
- |
|
should report unknown options
|
- |
|
should split combined short options
|
- |
|
should set bool options
|
- |
|
should set negated bool options
|
- |
|
should ignore undefined negated options
|
- |
|
should ignore non-bool negated options
|
- |
|
should store implicit value for non-boolean options
|
- |
|
should ignore invalid implicit values
|
- |
|
should expect value if none is given implicit
|
- |
|
should ignore invalid expected values
|
- |
|
should store valid expected values
|
- |
|
should store any non-option arguments
|
- |
|
should handle aliases
|
- |
|
#parse
|
Parser#parse |
2 |
should remove empty string arguments
|
- |
|
should trim arguments
|
- |
|