Start on build/test.js

This commit is contained in:
Antonio Scandurra
2016-07-29 17:42:56 +02:00
parent d660f9b9af
commit 1369a61df4
3 changed files with 24 additions and 1 deletions

View File

@@ -4,6 +4,7 @@
"dependencies": {
"babel-core": "5.8.38",
"coffee-script": "1.8.0",
"colors": "1.1.2",
"electron-packager": "7.3.0",
"fs-extra": "0.30.0",
"glob": "7.0.3",

22
build/test.js Executable file
View File

@@ -0,0 +1,22 @@
#!/usr/bin/env node
'use strict'
require('colors')
const path = require('path')
const childProcess = require('child_process')
const CONFIG = require('./config')
const packagedAppPath = path.resolve(__dirname, '..', 'out', 'Atom-darwin-x64')
const executablePath = path.join(packagedAppPath, 'Atom.app', 'Contents', 'MacOS', 'Atom')
const resourcePath = CONFIG.repositoryRootPath
const testPath = path.join(CONFIG.repositoryRootPath, 'spec')
const testArguments = [
'--resource-path', resourcePath,
'--test', testPath
]
console.log('Executing core specs...'.bold.green)
childProcess.spawnSync(executablePath, testArguments, {stdio: 'inherit'})

View File

@@ -33,4 +33,4 @@ dependencies:
test:
override:
- out/Atom-darwin-x64/Atom.app/Contents/MacOS/Atom --resource-path $(pwd) --test spec
- build/test.js