mirror of
https://github.com/atom/atom.git
synced 2026-01-23 13:58:08 -05:00
16 lines
613 B
CoffeeScript
16 lines
613 B
CoffeeScript
path = require 'path'
|
|
|
|
module.exports = (grunt) ->
|
|
{spawn} = require('./task-helpers')(grunt)
|
|
|
|
grunt.registerTask 'test', 'Run the specs', ->
|
|
done = @async()
|
|
commands = []
|
|
commands.push (callback) ->
|
|
spawn cmd: 'pkill', args: ['Atom'], -> callback()
|
|
commands.push (callback) ->
|
|
atomBinary = path.join(grunt.config.get('atom.contentsDir'), 'MacOS', 'Atom')
|
|
resourcePath = path.resolve(__dirname, '..')
|
|
spawn cmd: atomBinary, args: ['--test', "--resource-path=#{resourcePath}"], (error) -> callback(error)
|
|
grunt.util.async.waterfall commands, (error) -> done(error)
|