 path = require 'path'
 
 _ = require 'underscore-plus'
-
 async = require 'async'
 
 module.exports = (grunt) ->

    packageSpecQueue.drain = -> callback(null, failedPackages)

  runCoreSpecs = (callback) ->
    contentsDir = grunt.config.get('atom.contentsDir')
    if process.platform is 'darwin'
      appPath = path.join(contentsDir, 'MacOS', 'Atom')
    else if process.platform is 'win32'
      appPath = path.join(contentsDir, 'atom.exe')
    resourcePath = process.cwd()
    coreSpecsPath = path.resolve('spec')

    if process.platform is 'darwin'
      options =
        cmd: appPath
        args: ['--test', "--resource-path=#{resourcePath}", "--spec-directory=#{coreSpecsPath}"]


    # TODO: This should really be parallel on both platforms, however our
    # fixtures step on each others toes currently.
    if process.platform in ['darwin', 'linux']
      method = async.parallel
    else if process.platform is 'win32'
      method = async.series
