cli - command  ✔ should use optional command file when specified  ✔ should fall back to default command file location when optional command file is not specified  ✔ should set global options when specified  cli - _preCommand  ✔ should not log anything when commands have empty examples array  ✔ should not log anything when commands do not have any examples fields  ✔ should log examples when configured in commands  cli - _postCommand  ✔ should return without error when args is empty  ✔ should return without error when commands config is not set up with any args  ✔ should return without error when command line includes opt flag (commander.args is empty for some reason)  ✔ should log usage message and exit when commands config has args but the command does not provide any argument  ✔ should log usage message when there is a mix of mandatory and optional args in command config but command does not provide any argument  ✔ should log usage message when there are multiple optional args in command config but command does not provide any argument  ✔ should log error message when there is an invalid argument  ✔ should log error message when empty string is passed on required rule  ✔ should log error message when non-email string is passed on email rule  ✔ should log error message when rule does not exist  ✔ should return without error when command has valid argument as configured in commands setup file  ✔ should log error message and exit when command is unknown  ✔ should log error message when command has invalid command option  ✔ should return without error when there is no invalid command option  ✔ should return without error when command option does not have any validation rule  ✔ should log error message when command has invalid global option  ✔ should return without error when there is no invalid global option  ✔ should return without error when global option does not have any validation rule  cli - exec  ✔ should log stderr output and pass error to callback when an error occurs and fallthrough is not allowed  cli - execAndCollect  cli - exit  ✔ should exit with status code 0 when error does not exist  ✔ should exit with status code 1 and logs the error message when error exists  ✔ should log the stringified object when error is a non-Error object  ✔ should log the stringified when error is an array  cli - exitCb  ✔ should exit with status code 0 and logs the result when error does not exist and no success callback is specified  ✔ should exit with status code 1 and logs the error message when error exists and no error callback is specified  ✔ should exit with status code 1 and logs stringified object when error is non-Error object  ✔ should exit with status code 0 and call success callback when error does not exist and success callback is specified  ✔ should exit with status code 1 and call error callback when error exists and error callback is specified  ✔ should pass stringified error when error is non-Error object  cli - files  ✔ should return files as-is when all items are files  ✔ should return files under a directory  ✔ should only return matching files when match opt is specified  ✔ should return nothing when no match is found  ✔ should return nothing when directory contains non-directory and non-file  ✔ should return nothing when items are non-directory and non-file  cli - lookupConfig  ✔ should pass value when single configuration key exists as environment variable  ✔ should pass values when multiple configuration keys exists as environment variables  ✔ should pass undefined when configuration key does not exist at all  ✔ should pass values when multiple configuration keys exists in a json file  ✔ should pass undefined when configuration key does not exist in a json file  ✔ should pass values when multiple configuration keys exists in a yaml file  ✔ should pass undefined when configuration key does not exist in a yaml file  ✔ should throw error when configuration file extension is unsupported  ✔ should prompt for values when configuration file does not exist as environment variables and in configuration file  ✔ should retrieve values from various sources  ✔ should return undefined when keys do not exist  cli - lookupFile  ✔ should return file content in current directory when it exists  ✔ should return file content in home directory when it exists but none exists in current directory and platform is windows  ✔ should return file content in home directory when it exists but none exists in current directory and platform is non windows  ✔ should throw an error when configuration file does not exist anywhere and file has relative path  ✔ should return file content with absolute path when it exists  ✔ should throw an error when configuration file does not exist anywhere and file has absolute path  cli - spawn  ✔ should pass error and exit code to callback when exit code is not 0  ✔ should pass no error and exit code to callback when exit code is 0  cli - logStepHeading  ✔ should write coloured message via console log  ✔ should write coloured message with labels via console log  cli - logStepItemSuccess  ✔ should write coloured message via console log  ✔ should write coloured message with labels via console log  cli - logStepItemWarning  ✔ should write coloured message via console log  ✔ should write coloured message with labels via console log  cli - logStepItemError  ✔ should write coloured message via console error  ✔ should write coloured message with labels via console error   73 passing (100ms)