mirror of
https://github.com/Foundry376/Mailspring.git
synced 2024-11-14 05:41:05 +08:00
21 lines
625 B
CoffeeScript
21 lines
625 B
CoffeeScript
|
path = require 'path'
|
||
|
childProcess = require 'child_process'
|
||
|
|
||
|
module.exports = (grunt) ->
|
||
|
desc = "Boots Selenium via Spectron to run integration tests"
|
||
|
grunt.registerTask 'run-integration-tests', desc, ->
|
||
|
done = @async()
|
||
|
|
||
|
rootPath = path.resolve('.')
|
||
|
npmPath = path.join(rootPath, "build", "node_modules", ".bin", "npm")
|
||
|
|
||
|
process.chdir('./spec_integration')
|
||
|
testProc = childProcess.spawn(npmPath,
|
||
|
["test", "NYLAS_ROOT_PATH=#{rootPath}"],
|
||
|
{stdio: "inherit"})
|
||
|
|
||
|
testProc.on 'exit', (exitCode, signal) ->
|
||
|
process.chdir('..')
|
||
|
if exitCode is 0 then done()
|
||
|
else done(false)
|