Doc test flag

This commit is contained in:
Corey Johnson & Kevin Sawicki
2013-05-29 14:57:33 -07:00
parent b91487c60f
commit fa3c636494
2 changed files with 5 additions and 5 deletions

View File

@@ -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)

View File

@@ -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}