mirror of
https://github.com/atom/atom.git
synced 2026-01-23 13:58:08 -05:00
Doc test flag
This commit is contained in:
@@ -15,11 +15,10 @@ class AtomApplication
|
||||
menu: null
|
||||
resourcePath: null
|
||||
pathsToOpen: null
|
||||
testMode: null
|
||||
version: null
|
||||
socketPath: '/tmp/atom.sock'
|
||||
|
||||
constructor: ({@resourcePath, @pathsToOpen, @testMode, @version, pidToKillWhenClosed}) ->
|
||||
constructor: ({@resourcePath, @pathsToOpen, @version, test, pidToKillWhenClosed}) ->
|
||||
@pidsToOpenWindows = {}
|
||||
@pathsToOpen ?= [null]
|
||||
@windows = []
|
||||
@@ -32,7 +31,7 @@ class AtomApplication
|
||||
@buildApplicationMenu()
|
||||
@handleEvents()
|
||||
|
||||
if @testMode
|
||||
if test
|
||||
@runSpecs(true)
|
||||
else
|
||||
@openPaths(@pathsToOpen, pidToKillWhenClosed)
|
||||
|
||||
@@ -28,6 +28,7 @@ parseCommandLine = ->
|
||||
"""
|
||||
options.alias('d', 'dev').boolean('d').describe('d', 'Run in development mode.')
|
||||
options.alias('h', 'help').boolean('h').describe('h', 'Print this usage message.')
|
||||
options.alias('t', 'test').boolean('t').describe('t', 'Run the Atom specs and exit with error code on failures.')
|
||||
options.alias('w', 'wait').boolean('w').describe('w', 'Wait for window to be closed before returning.')
|
||||
args = options.argv
|
||||
if args.h
|
||||
@@ -39,7 +40,7 @@ parseCommandLine = ->
|
||||
pathsToOpen ?= [executedFrom] if executedFrom
|
||||
pathsToOpen = pathsToOpen.map (pathToOpen) ->
|
||||
path.resolve(executedFrom ? process.cwd(), pathToOpen)
|
||||
testMode = true if args['test']
|
||||
test = args['test']
|
||||
pidToKillWhenClosed = args['pid'] if args['wait']
|
||||
|
||||
if args['resource-path']
|
||||
@@ -52,4 +53,4 @@ parseCommandLine = ->
|
||||
catch e
|
||||
resourcePath = path.dirname(__dirname)
|
||||
|
||||
{resourcePath, executedFrom, pathsToOpen, testMode, version, pidToKillWhenClosed}
|
||||
{resourcePath, pathsToOpen, test, version, pidToKillWhenClosed}
|
||||
|
||||
Reference in New Issue
Block a user