mirror of
https://github.com/Foundry376/Mailspring.git
synced 2024-11-13 21:24:58 +08:00
f56dc18690
Summary: - You can now pass `--config-dir-path=/some/custom/path` to `./N1.sh` - `main.coffee` cleaned up a bit. A lot of unused params from legacy Atom stuff were still being used - Integration specs now set the config dir before booting. - New spec to check for the autoupdater in the app and make sure it's pointing at the right place. Test Plan: script/grunt run-integration-tests Reviewers: juan, bengotow Reviewed By: bengotow Differential Revision: https://phab.nylas.com/D2331
38 lines
1 KiB
JavaScript
38 lines
1 KiB
JavaScript
// argv[0] = node
|
|
// argv[1] = jasmine
|
|
// argv[2] = JASMINE_CONFIG_PATH=./jasmine/config.json
|
|
// argv[3] = NYLAS_ROOT_PATH=/path/to/nylas/root
|
|
var babelOptions = require('../../static/babelrc.json');
|
|
require('babel-core/register')(babelOptions);
|
|
|
|
var chalk = require('chalk')
|
|
var util = require('util')
|
|
|
|
console.errorColor = function(err){
|
|
if (typeof err === "string") {
|
|
console.error(chalk.red(err));
|
|
} else {
|
|
console.error(chalk.red(util.inspect(err)));
|
|
}
|
|
}
|
|
|
|
console.inspect = function(val) {
|
|
console.log(util.inspect(val, true, depth=7, colorize=true));
|
|
}
|
|
|
|
jasmine.NYLAS_ROOT_PATH = process.argv[3].split("NYLAS_ROOT_PATH=")[1]
|
|
jasmine.UNIT_TEST_TIMEOUT = 120*1000;
|
|
jasmine.BOOT_TIMEOUT = 30*1000;
|
|
jasmine.DEFAULT_TIMEOUT_INTERVAL = 30*1000
|
|
|
|
Promise = require('bluebird')
|
|
Promise.config({
|
|
warnings: true,
|
|
longStackTraces: true,
|
|
cancellation: true
|
|
})
|
|
|
|
process.on("unhandledRejection", function(reason, promise) {
|
|
if (reason.stack) { console.errorColor(reason.stack); }
|
|
console.errorColor(promise);
|
|
});
|