Home Reference Source Test Repository

Test

Description Identifier Count

should work with string argument

-

should set default type boolean

-

should work without any arguments

-

should throw with invalid type

-

should return false for boolean options

-

should return true for any other type

-

should return parsed number value

-

should return null if a number cannot be parsed

-

should return original value for any other type

-
test/Parser.spec.js -

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

-

should set option value

-

should override on multiple values

-

should add any args that expect values

-

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

-

should remove empty string arguments

-

should trim arguments

-