mirror of
https://github.com/Foundry376/Mailspring.git
synced 2024-11-11 18:32:20 +08:00
4014b4e187
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
40 lines
1.3 KiB
CoffeeScript
40 lines
1.3 KiB
CoffeeScript
# Start the crash reporter before anything else.
|
|
require('crash-reporter').start(productName: 'N1', companyName: 'Nylas')
|
|
|
|
|
|
path = require 'path'
|
|
fs = require 'fs-plus'
|
|
|
|
# Swap out Node's native Promise for Bluebird, which allows us to
|
|
# do fancy things like handle exceptions inside promise blocks
|
|
global.Promise = require 'bluebird'
|
|
|
|
try
|
|
require '../src/window'
|
|
NylasEnvConstructor = require '../src/nylas-env'
|
|
window.NylasEnv = window.atom = NylasEnvConstructor.loadOrCreate()
|
|
global.Promise.longStackTraces() if NylasEnv.inDevMode()
|
|
|
|
# Show window synchronously so a focusout doesn't fire on input elements
|
|
# that are focused in the very first spec run.
|
|
if not NylasEnv.getLoadSettings().exitWhenDone
|
|
NylasEnv.getCurrentWindow().show()
|
|
|
|
{runSpecSuite} = require './jasmine-helper'
|
|
|
|
# Add 'src/global' to module search path.
|
|
globalPath = path.join(NylasEnv.getLoadSettings().resourcePath, 'src', 'global')
|
|
require('module').globalPaths.push(globalPath)
|
|
# Still set NODE_PATH since tasks may need it.
|
|
process.env.NODE_PATH = globalPath
|
|
|
|
document.title = "Spec Suite"
|
|
document.getElementById("application-loading-cover").remove()
|
|
|
|
runSpecSuite './spec-suite', NylasEnv.getLoadSettings().logFile
|
|
catch error
|
|
if NylasEnv?.getLoadSettings().exitWhenDone
|
|
console.error(error.stack ? error)
|
|
NylasEnv.exit(1)
|
|
else
|
|
throw error
|