mirror of
https://github.com/cypress-io/cypress.git
synced 2026-05-24 09:29:35 -05:00
4409698c7f
* remove fs.existsSync in unit test, close #373 * updating an integration test * remove unlinkSync from an integration spec * remove only * make saved_stage async * switched some tests to async state * server: fix more state tests * working on config to async * change config mergeDefaults to async * more .mergeDefaults tests updated * fix config unit tests * remove only in config unit tests * fix server unit test * fix two more tests * server: maybe all unit tests fixed * server: handle NPM 3 vs 4 in exit codes * fix server start * fix another server startup in test * server: messaging and promise.try
38 lines
1.0 KiB
CoffeeScript
38 lines
1.0 KiB
CoffeeScript
require("./util/http_overrides")
|
|
require("./fs_warn")(require("fs-extra"))
|
|
|
|
os = require("os")
|
|
cwd = require("./cwd")
|
|
Promise = require("bluebird")
|
|
|
|
Promise.config({cancellation: true})
|
|
|
|
## never cut off stack traces
|
|
Error.stackTraceLimit = Infinity
|
|
|
|
## cannot use relative require statement
|
|
## here because when obfuscated package
|
|
## would not be available
|
|
pkg = require("@packages/root")
|
|
|
|
try
|
|
## i wish we didn't have to do this but we have to append
|
|
## these command line switches immediately
|
|
app = require("electron").app
|
|
app.commandLine.appendSwitch("disable-renderer-backgrounding", true)
|
|
app.commandLine.appendSwitch("ignore-certificate-errors", true)
|
|
|
|
if os.platform() is "linux"
|
|
app.disableHardwareAcceleration()
|
|
|
|
getEnv = ->
|
|
## instead of setting NODE_ENV we will
|
|
## use our own separate CYPRESS_ENV so
|
|
## as not to conflict with CI providers
|
|
|
|
## use env from package first
|
|
## or development as default
|
|
process.env["CYPRESS_ENV"] or= pkg.env ? "development"
|
|
|
|
module.exports = getEnv()
|