mirror of
https://github.com/atom/atom.git
synced 2026-01-24 06:18:03 -05:00
Add test task
This commit is contained in:
@@ -6,7 +6,8 @@ CSON = require 'season'
|
||||
|
||||
BUILD_DIR = '/tmp/atom-build/atom-shell'
|
||||
APP_NAME = 'Atom.app'
|
||||
APP_DIR = path.join(BUILD_DIR, APP_NAME, 'Contents', 'Resources', 'app')
|
||||
CONTENTS_DIR = path.join(BUILD_DIR, APP_NAME, 'Contents')
|
||||
APP_DIR = path.join(CONTENTS_DIR, 'Resources', 'app')
|
||||
INSTALL_DIR = path.join('/Applications', APP_NAME)
|
||||
|
||||
module.exports = (grunt) ->
|
||||
@@ -221,6 +222,15 @@ module.exports = (grunt) ->
|
||||
exec('script/update-atom-shell', callback)
|
||||
grunt.util.async.waterfall commands, (error) -> done(!error?)
|
||||
|
||||
grunt.registerTask 'test', 'Run the specs', ->
|
||||
done = @async()
|
||||
commands = []
|
||||
commands.push (callback) ->
|
||||
exec('pkill', ['Atom'], callback)
|
||||
commands.push (result, callback) ->
|
||||
exec(path.join(CONTENTS_DIR, 'MacOS', 'Atom'), ['--test', '--resource-path', __dirname], callback)
|
||||
grunt.util.async.waterfall commands, (error) -> done(!error?)
|
||||
|
||||
grunt.registerTask('compile', ['coffee', 'less', 'cson'])
|
||||
grunt.registerTask('lint', ['coffeelint', 'csslint'])
|
||||
grunt.registerTask('default', ['lint', 'build'])
|
||||
|
||||
Reference in New Issue
Block a user