AtSCMCli
|
AtSCMCli |
#constructor
|
AtSCMCli#constructor |
should throw UsageError with invalid options
|
- |
should create an instance of Liftoff
|
- |
should not add run argument if valid command is given
|
- |
should not add run argument if --help is given
|
- |
should not add run argument if --version is given
|
- |
should add run argument if no command is given
|
- |
should set runViaCli
|
- |
#_exposeOverride
|
AtSCMCli#_exposeOverride |
should set single options
|
- |
should set object options
|
- |
should use default base
|
- |
#parseArguments
|
AtSCMCli#parseArguments |
should fail with UsageError with an unknown argument
|
- |
should report unknown arguments for strict commands
|
- |
should not report unknown arguments for non-strict commands
|
- |
should return options with valid arguments
|
- |
should set AtSCMCli#options with valid arguments
|
- |
should set AtSCMCli#command with valid command
|
- |
should expose project options as environment variables
|
- |
#getEnvironment
|
AtSCMCli#getEnvironment |
should call Liftoff#launch with cwd and projectfile option
|
- |
should set AtSCMCli#environment
|
- |
when not looking up parent directories
|
- |
should resolve to initial cwd
|
- |
should resolve to initial cwd in project child directories
|
- |
should ignore --projectfile option
|
- |
#requireEnvironment
|
AtSCMCli#requireEnvironment |
should fail without local module
|
- |
should return environment if successful
|
- |
#getVersion
|
AtSCMCli#getVersion |
should return cli version without local module
|
- |
should even return cli version with invalid cwd
|
- |
should return local version with local module
|
- |
#printVersion
|
AtSCMCli#printVersion |
should print cli version only without local module
|
- |
should print cli, local and atserver version with local module
|
- |
#runCommand
|
AtSCMCli#runCommand |
should print version if --version is used
|
- |
should run command if used
|
- |
should warn if no command is used
|
- |
#launch
|
AtSCMCli#launch |
should call AtSCMCli#parseArguments
|
- |
should handle all exceptions if run via cli
|
- |
should report help on usage errors if run via cli
|
- |
should start debug mode with --debug option
|
- |
with ATSCM_DEBUG env var
|
- |
should start debug mode
|
- |
bin
|
- |
should call launch
|
- |
ConfigCommand
|
ConfigCommand |
#run
|
ConfigCommand#run |
when overrides are available (atscm >= v0.4)
|
- |
should print local module's ProjectConfig class
|
- |
when overrides are not available (atscm < v0.4)
|
- |
should print local module's Atviseproject class
|
- |
should warn that overrides are not available
|
- |
DocsCommand
|
DocsCommand |
#localDocsPath
|
DocsCommand#localDocsPath |
should be local api docs by default
|
- |
should be cli api docs with --cli option
|
- |
#remoteDocsUrl
|
DocsCommand#remoteDocsUrl |
should return path to atscm docs by default
|
- |
should return path to atscm-cli docs with --cli option passed
|
- |
#addressToOpen
|
DocsCommand#addressToOpen |
should return local path if not remote option was passed
|
- |
should return local path if remote option was set to false
|
- |
should return remote url if remote was set to true
|
- |
should return remote url if cli.env.modulePath is undefined
|
- |
should return local path if cli option was set
|
- |
#run
|
DocsCommand#run |
should open local api docs by default
|
- |
should open cli api docs with --cli option
|
- |
should open in specific browser with --browser option
|
- |
should call AtSCMCli#getEnvironment if no environment was passed
|
- |
should open remote docs with --remote option passed
|
- |
#requiresEnvironment
|
DocsCommand#requiresEnvironment |
should return false if --cli is used
|
- |
should return false if --remote
|
- |
should return false if no --remote option is passed
|
- |
should return false if --no-remote and --cli option is passed
|
- |
should return true if --no-remote and no --cli option is passed
|
- |
InitCommand
|
InitCommand |
#checkDirectory
|
InitCommand#checkDirectory |
should fail if directory does not exist
|
- |
should fail if path is not a directory
|
- |
should fail if directory is not empty
|
- |
should work with empty dir
|
- |
should work in non-empty dir with overwrite set
|
- |
when non-ENOENT and ENOTDIR occurres
|
- |
should fail with original error
|
- |
#createEmptyPackage
|
InitCommand#createEmptyPackage |
should fail with invalid path
|
- |
should work in empty directory
|
- |
#install
|
InitCommand#install |
should run which for npm
|
- |
should forward errors occuring in npm
|
- |
should report error if npm fails
|
- |
when npm is not installed
|
- |
should fail
|
- |
#installLocal
|
InitCommand#installLocal |
should call InitCommand#install
|
- |
should install beta version with useBetaVersion
|
- |
should run npm link with link
|
- |
#checkCliVersion
|
InitCommand#checkCliVersion |
should throw error if version does not match
|
- |
#getDefaultOptions
|
- |
should return plain value defaults
|
- |
should return plain value default choices
|
- |
should return object value default choices
|
- |
should resolve choices with current value
|
- |
should skip options if specified
|
- |
#getOptions
|
InitCommand#getOptions |
should run inquirer by default
|
- |
should use defaults with useDefaults
|
- |
#writeFiles
|
InitCommand#writeFiles |
should call local package init script
|
- |
#installDependencies
|
InitCommand#installDependencies |
should run install with given deps
|
- |
#run
|
InitCommand#run |
should call AtSCMCli#getEnvironment twice
|
- |
should not search in parent directories
|
- |
should call InitCommand#createEmptyPackage
|
- |
should call InitCommand#installLocal
|
- |
should call process.chdir
|
- |
should call InitCommand#getOptions
|
- |
should call InitCommand#writeFiles
|
- |
should call InitCommand#installDependencies
|
- |
#requiresEnvironment
|
InitCommand#requiresEnvironment |
should return false
|
- |
RunCommand
|
RunCommand |
#run
|
RunCommand#run |
should run gulp-cli
|
- |
UpdateCommand
|
UpdateCommand |
#getLatestVersion
|
UpdateCommand#getLatestVersion |
should call npm api
|
- |
should return beta versions with useBetaRelease
|
- |
#updateNeeded
|
UpdateCommand#updateNeeded |
should return false if latest is older than current version
|
- |
should return false if latest equals current version
|
- |
should return latest version if latest is newer than current version
|
- |
#update
|
UpdateCommand#update |
should run npm install
|
- |
should install beta with useBetaRelease
|
- |
#requiresEnvironment
|
UpdateCommand#requiresEnvironment |
should always return true
|
- |
#run
|
UpdateCommand#run |
should not call #update if not required
|
- |
should call #update if required
|
- |
Issue #62
|
- |
should not throw on missing task
|
- |
Command
|
Command |
#constructor
|
Command#constructor |
should fail if options.maxArguments is less than options.maxArguments
|
- |
should store name, description and options
|
- |
#run
|
Command#run |
must be implmented by all subclasses
|
- |
#usage
|
Command#usage |
should be only name with no options.arguments set
|
- |
should be name followed by arguments with options.arguments set
|
- |
#options
|
Command#options |
should be empty object if options.options were not set
|
- |
should return all options passed as options.options
|
- |
#demandCommand
|
Command#demandCommand |
should default to [0]
|
- |
should be use options.maxArguments if set
|
- |
should be use options.minArguments if set
|
- |
should be use options.minArguments and options.maxArguments if set
|
- |
#strict
|
Command#strict |
should default to true
|
- |
should return the value passed to the constructor
|
- |
Option
|
Option |
#constructor
|
Option#constructor |
should store description
|
- |
should store all options passed
|
- |
.boolean
|
Option.boolean |
should return an option
|
- |
should set type to boolean
|
- |
should store all options passed
|
- |
.string
|
Option.string |
should return an option
|
- |
should set type to string
|
- |
should store all options passed
|
- |
UsageError
|
UsageError |
#constructor
|
UsageError#constructor |
should create an instance of Error
|
- |
should create a stack trace
|
- |
External
|
ExternalCommand |
#resolveBin
|
ExternalCommand#resolveBin |
should be fulfilled with which results
|
- |
should reject on which error
|
- |
#spawn
|
ExternalCommand#spawn |
should be rejected on spawn error
|
- |
should be rejected on non-zero exit code
|
- |
should be fulfill with trimmed stdout data
|
- |
should pass args to spawn
|
- |
should pass options.spawn to spawn
|
- |
should call options.onspawn after spawn
|
- |
#run
|
ExternalCommand#run |
should call #resolveBin with name
|
- |
should call #spawn with which results and other args
|
- |
LogFormat
|
LogFormat |
.path
|
LogFormat.path |
should change color to magenta
|
- |
should prettify user path
|
- |
.command
|
LogFormat.command |
should return bold text
|
- |
.value
|
LogFormat.value |
should return cyan colored text
|
- |
.number
|
LogFormat.number |
should return magenta colored text
|
- |
Logger
|
Logger |
.debug
|
Logger.debug |
should call gulplog.debug
|
- |
.info
|
Logger.info |
should call gulplog.info
|
- |
.warn
|
Logger.warn |
should call gulplog.warn
|
- |
.error
|
Logger.warn |
should call gulplog.error
|
- |
.applyOptions
|
Logger.applyOptions |
when using option "silent"
|
- |
should only add a noop listener for "error" events
|
- |
when using "logLevel" 0
|
- |
should only add a noop listener for "error" events
|
- |
when using "logLevel" 1
|
- |
should only add a listener for "error" events
|
- |
when using "logLevel" 2
|
- |
should add listeners for "error" and "warn" events
|
- |
when using "logLevel" 3
|
- |
should add listeners for "error", "warn" and "info" events
|
- |
when using "logLevel" 4
|
- |
should add listeners for all events
|
- |
.pipeLastLine
|
Logger.pipeLastLine |
should print last line of each chunk
|
- |
should ignore empty lines
|
- |