From 1a92ec89b54bd82799b41e85e4430e70ac594208 Mon Sep 17 00:00:00 2001 From: Bill Glesias Date: Thu, 23 Oct 2025 15:29:11 -0400 Subject: [PATCH 1/3] chore: rework electron switches to avoid unknown side effects how bad does this fail? fix server tests --- .../server/lib/append_electron_switches.ts | 57 ++++++ packages/server/lib/cypress.ts | 2 - packages/server/lib/environment.js | 93 ---------- packages/server/lib/environment.ts | 29 +++ packages/server/start-cypress.js | 13 ++ packages/server/test/spec_helper.js | 5 +- .../unit/append_electron_switches_spec.ts | 130 ++++++++++++++ packages/server/test/unit/environment_spec.js | 167 ------------------ packages/server/test/unit/environment_spec.ts | 119 +++++++++++++ 9 files changed, 351 insertions(+), 264 deletions(-) create mode 100644 packages/server/lib/append_electron_switches.ts delete mode 100644 packages/server/lib/environment.js create mode 100644 packages/server/lib/environment.ts create mode 100644 packages/server/test/unit/append_electron_switches_spec.ts delete mode 100644 packages/server/test/unit/environment_spec.js create mode 100644 packages/server/test/unit/environment_spec.ts diff --git a/packages/server/lib/append_electron_switches.ts b/packages/server/lib/append_electron_switches.ts new file mode 100644 index 00000000000..7d9fcd39f54 --- /dev/null +++ b/packages/server/lib/append_electron_switches.ts @@ -0,0 +1,57 @@ +import os from 'os' +import debugModule from 'debug' +import { DEFAULT_ELECTRON_FLAGS } from './util/chromium_flags' + +const debug = debugModule('cypress:server:append_electron_switches') + +export const appendElectronSwitches = (app: Electron.App) => { + // NOTE: errors are printed in development mode only + try { + // when running inside the electron process, we need to append the default switches immediately + // before the electron browser is launched. Otherwise, there may be some odd behavior. + debug('appending default switches for electron: %o', DEFAULT_ELECTRON_FLAGS) + DEFAULT_ELECTRON_FLAGS.forEach(({ name, value }) => { + value ? app.commandLine.appendSwitch(name, value) : app.commandLine.appendSwitch(name) + }) + + if (os.platform() === 'linux') { + app.disableHardwareAcceleration() + } + + if (process.env.ELECTRON_EXTRA_LAUNCH_ARGS) { + // regex will be used to convert ELECTRON_EXTRA_LAUNCH_ARGS into an array, for example + // input: 'foo --ipsum=0 --bar=--baz=quux --lorem="--ipsum=dolor --sit=amet"' + // output: ['foo', '--ipsum=0', '--bar=--baz=quux', '--lorem="--ipsum=dolor --sit=amet"'] + const regex = /(?:[^\s"']+|"[^"]*"|'[^']*')+/g + const electronLaunchArguments = process.env.ELECTRON_EXTRA_LAUNCH_ARGS.match(regex) || [] + + electronLaunchArguments.forEach((arg) => { + // arg can be just key --disable-http-cache + // or key value --remote-debugging-port=8315 + // or key value with another value --foo=--bar=4196 + // or key value with another multiple value --foo='--bar=4196 --baz=quux' + const [key, ...value] = arg.split('=') + + // because this is an environment variable, everything is a string + // thus we don't have to worry about casting + // --foo=false for example will be "--foo", "false" + if (value.length) { + let joinedValues = value.join('=') + + // check if the arg is wrapped in " or ' (unicode) + const isWrappedInQuotes = !!['\u0022', '\u0027'].find(((charAsUnicode) => joinedValues.startsWith(charAsUnicode) && joinedValues.endsWith(charAsUnicode))) + + if (isWrappedInQuotes) { + joinedValues = joinedValues.slice(1, -1) + } + + app.commandLine.appendSwitch(key, joinedValues) + } else { + app.commandLine.appendSwitch(key) + } + }) + } + } catch (e) { + debug('environment error %s', e.message) + } +} diff --git a/packages/server/lib/cypress.ts b/packages/server/lib/cypress.ts index b15a78ff3dd..a238023e5be 100644 --- a/packages/server/lib/cypress.ts +++ b/packages/server/lib/cypress.ts @@ -1,5 +1,3 @@ -require('./environment') - // we are not requiring everything up front // to optimize how quickly electron boots while // in dev or linux production. the reasoning is diff --git a/packages/server/lib/environment.js b/packages/server/lib/environment.js deleted file mode 100644 index 28de34f8cea..00000000000 --- a/packages/server/lib/environment.js +++ /dev/null @@ -1,93 +0,0 @@ -require('./util/fs') -const DEFAULT_ELECTRON_FLAGS = require('./util/chromium_flags').DEFAULT_ELECTRON_FLAGS - -const os = require('os') - -const Promise = require('bluebird') -const debug = require('debug')('cypress:server') - -// never cut off stack traces -Error.stackTraceLimit = Infinity - -// cannot use relative require statement -// here because when obfuscated package -// would not be available -const pkg = require('@packages/root') - -// instead of setting NODE_ENV we will -// use our own separate CYPRESS_INTERNAL_ENV so -// as not to conflict with CI providers - -// use env from package first -// or development as default -const env = process.env['CYPRESS_INTERNAL_ENV'] || (process.env['CYPRESS_INTERNAL_ENV'] = pkg.env != null ? pkg.env : 'development') - -process.env['CYPRESS'] = 'true' - -const config = { - // uses cancellation for automation timeouts - cancellation: true, -} - -if (env === 'development') { - // enable long stack traces in dev - config.longStackTraces = true -} - -Promise.config(config) - -// NOTE: errors are printed in development mode only -try { - // i wish we didn't have to do this but we have to append - // these command line switches immediately - const { - app, - } = require('electron') - - debug('appending default switches for electron: %o', DEFAULT_ELECTRON_FLAGS) - DEFAULT_ELECTRON_FLAGS.forEach(({ name, value }) => { - value ? app.commandLine.appendSwitch(name, value) : app.commandLine.appendSwitch(name) - }) - - if (os.platform() === 'linux') { - app.disableHardwareAcceleration() - } - - if (process.env.ELECTRON_EXTRA_LAUNCH_ARGS) { - // regex will be used to convert ELECTRON_EXTRA_LAUNCH_ARGS into an array, for example - // input: 'foo --ipsum=0 --bar=--baz=quux --lorem="--ipsum=dolor --sit=amet"' - // output: ['foo', '--ipsum=0', '--bar=--baz=quux', '--lorem="--ipsum=dolor --sit=amet"'] - const regex = /(?:[^\s"']+|"[^"]*"|'[^']*')+/g - const electronLaunchArguments = process.env.ELECTRON_EXTRA_LAUNCH_ARGS.match(regex) || [] - - electronLaunchArguments.forEach((arg) => { - // arg can be just key --disable-http-cache - // or key value --remote-debugging-port=8315 - // or key value with another value --foo=--bar=4196 - // or key value with another multiple value --foo='--bar=4196 --baz=quux' - const [key, ...value] = arg.split('=') - - // because this is an environment variable, everything is a string - // thus we don't have to worry about casting - // --foo=false for example will be "--foo", "false" - if (value.length) { - let joinedValues = value.join('=') - - // check if the arg is wrapped in " or ' (unicode) - const isWrappedInQuotes = !!['\u0022', '\u0027'].find(((charAsUnicode) => joinedValues.startsWith(charAsUnicode) && joinedValues.endsWith(charAsUnicode))) - - if (isWrappedInQuotes) { - joinedValues = joinedValues.slice(1, -1) - } - - app.commandLine.appendSwitch(key, joinedValues) - } else { - app.commandLine.appendSwitch(key) - } - }) - } -} catch (e) { - debug('environment error %s', e.message) -} - -module.exports = env diff --git a/packages/server/lib/environment.ts b/packages/server/lib/environment.ts new file mode 100644 index 00000000000..407758a9064 --- /dev/null +++ b/packages/server/lib/environment.ts @@ -0,0 +1,29 @@ +import pkg from '@packages/root' +import Bluebird from 'bluebird' + +export const configureLongStackTraces = (env: string | undefined) => { + // never cut off stack traces + Error.stackTraceLimit = Infinity + + Bluebird.config({ + // uses cancellation for automation timeouts + cancellation: true, + // enable long stack traces in dev + longStackTraces: env === 'development', + }) +} + +export const calculateCypressInternalEnv = () => { + // instead of setting NODE_ENV we will + // use our own separate CYPRESS_INTERNAL_ENV so + // as not to conflict with CI providers + + // use env from package first + // or development as default + if (!process.env['CYPRESS_INTERNAL_ENV']) { + // @ts-expect-error + return pkg.env !== null && pkg.env !== undefined ? pkg.env : 'development' + } + + return process.env['CYPRESS_INTERNAL_ENV'] +} diff --git a/packages/server/start-cypress.js b/packages/server/start-cypress.js index 4aeb5ac3e89..df0ee1d27d5 100644 --- a/packages/server/start-cypress.js +++ b/packages/server/start-cypress.js @@ -3,12 +3,25 @@ const { telemetry, OTLPTraceExporterCloud } = require('@packages/telemetry') const { apiRoutes } = require('./lib/cloud/routes') const encryption = require('./lib/cloud/encryption') +const { calculateCypressInternalEnv, configureLongStackTraces } = require('./lib/environment') + +process.env['CYPRESS_INTERNAL_ENV'] = calculateCypressInternalEnv() +configureLongStackTraces(process.env['CYPRESS_INTERNAL_ENV']) +process.env['CYPRESS'] = 'true' + // are we in the main node process or the electron process? const isRunningElectron = electronApp.isRunning() const pkg = require('@packages/root') if (isRunningElectron) { + // if we are in the electron process, we need to patch the electron switches before Cypress launches the app + // @see https://www.electronjs.org/docs/latest/api/environment-variables#electron_run_as_node + const { app } = require('electron') + const { appendElectronSwitches } = require('./lib/append_electron_switches') + + appendElectronSwitches(app) + // To pass unencrypted telemetry data to an independent open telemetry endpoint, // disable the encryption header, update the url, and add any other required headers. // For example: diff --git a/packages/server/test/spec_helper.js b/packages/server/test/spec_helper.js index 32332b4bed8..901ec78cee6 100644 --- a/packages/server/test/spec_helper.js +++ b/packages/server/test/spec_helper.js @@ -1,8 +1,9 @@ /* eslint-disable no-console */ -require('../lib/environment') - const { enable, mockElectron } = require('./mockery_helper') +const { configureLongStackTraces } = require('../lib/environment') + +configureLongStackTraces('development') const chai = require('chai') chai.use(require('chai-subset')) diff --git a/packages/server/test/unit/append_electron_switches_spec.ts b/packages/server/test/unit/append_electron_switches_spec.ts new file mode 100644 index 00000000000..df1f67d8d1b --- /dev/null +++ b/packages/server/test/unit/append_electron_switches_spec.ts @@ -0,0 +1,130 @@ +import os from 'os' +import sinon from 'sinon' +import mockedEnv from 'mocked-env' +import { appendElectronSwitches } from '../../lib/append_electron_switches' + +describe('lib/append_electron_switches', () => { + beforeEach(() => { + sinon.stub(os, 'platform').returns('linux') + }) + + afterEach(() => { + sinon.restore() + }) + + // @see https://github.com/electron/electron/issues/46538 + // @see https://github.com/cypress-io/cypress/issues/32361 + context('sets gtk-version=3 in Electron >= 36', () => { + it('sets launch args', async () => { + const mockApp = { + commandLine: { + appendSwitch: sinon.stub(), + }, + } as unknown as Electron.App + + appendElectronSwitches(mockApp) + expect(mockApp.commandLine.appendSwitch).to.have.been.calledWith('--gtk-version', '3') + }) + }) + + context('disables hardware acceleration on Linux', () => { + it('disables hardware acceleration', async () => { + const mockApp = { + disableHardwareAcceleration: sinon.stub(), + commandLine: { + appendSwitch: sinon.stub(), + }, + } as unknown as Electron.App + + appendElectronSwitches(mockApp) + expect(mockApp.disableHardwareAcceleration).to.have.been.called + }) + }) + + context('parses ELECTRON_EXTRA_LAUNCH_ARGS', () => { + let restore = null + + afterEach(() => { + if (restore) { + return restore() + } + }) + + it('sets launch args', async () => { + restore = mockedEnv({ + ELECTRON_EXTRA_LAUNCH_ARGS: '--foo --bar=baz --quux=true', + }) + + const mockApp = { + disableHardwareAcceleration: sinon.stub(), + commandLine: { + appendSwitch: sinon.stub(), + }, + } as unknown as Electron.App + + appendElectronSwitches(mockApp) + expect(mockApp.commandLine.appendSwitch).to.have.been.calledWith('--foo') + expect(mockApp.commandLine.appendSwitch).to.have.been.calledWith('--bar', 'baz') + + expect(mockApp.commandLine.appendSwitch).to.have.been.calledWith('--quux', 'true') + }) + + it('sets launch args with zero', async () => { + restore = mockedEnv({ + ELECTRON_EXTRA_LAUNCH_ARGS: '--foo --bar=baz --quux=0', + }) + + const mockApp = { + disableHardwareAcceleration: sinon.stub(), + commandLine: { + appendSwitch: sinon.stub(), + }, + } as unknown as Electron.App + + appendElectronSwitches(mockApp) + expect(mockApp.commandLine.appendSwitch).to.have.been.calledWith('--foo') + expect(mockApp.commandLine.appendSwitch).to.have.been.calledWith('--bar', 'baz') + + expect(mockApp.commandLine.appendSwitch).to.have.been.calledWith('--quux', '0') + }) + + it('sets launch args with false', async () => { + restore = mockedEnv({ + ELECTRON_EXTRA_LAUNCH_ARGS: '--foo --bar=baz --quux=false', + }) + + const mockApp = { + disableHardwareAcceleration: sinon.stub(), + commandLine: { + appendSwitch: sinon.stub(), + }, + } as Electron.App + + appendElectronSwitches(mockApp) + + expect(mockApp.commandLine.appendSwitch).to.have.been.calledWith('--foo') + expect(mockApp.commandLine.appendSwitch).to.have.been.calledWith('--bar', 'baz') + + expect(mockApp.commandLine.appendSwitch).to.have.been.calledWith('--quux', 'false') + }) + + it('sets launch args with multiple values inside quotes', async () => { + restore = mockedEnv({ + ELECTRON_EXTRA_LAUNCH_ARGS: `--foo --ipsum=0 --bar=--baz=quux --lorem='--ipsum=dolor --sit=amet'`, + }) + + const mockApp = { + disableHardwareAcceleration: sinon.stub(), + commandLine: { + appendSwitch: sinon.stub(), + }, + } as Electron.App + + appendElectronSwitches(mockApp) + expect(mockApp.commandLine.appendSwitch).to.have.been.calledWith('--foo') + expect(mockApp.commandLine.appendSwitch).to.have.been.calledWith('--ipsum', '0') + expect(mockApp.commandLine.appendSwitch).to.have.been.calledWith('--bar', '--baz=quux') + expect(mockApp.commandLine.appendSwitch).to.have.been.calledWith('--lorem', '--ipsum=dolor --sit=amet') + }) + }) +}) diff --git a/packages/server/test/unit/environment_spec.js b/packages/server/test/unit/environment_spec.js deleted file mode 100644 index 52eef838037..00000000000 --- a/packages/server/test/unit/environment_spec.js +++ /dev/null @@ -1,167 +0,0 @@ -require('../spec_helper') - -const Promise = require('bluebird') -const pkg = require('@packages/root') -const { fs } = require(`../../lib/util/fs`) -const mockedEnv = require('mocked-env') -const { app } = require('electron') - -const setEnv = (env) => { - process.env['CYPRESS_INTERNAL_ENV'] = env - - return expectedEnv(env) -} - -const expectedEnv = function (env) { - require(`../../lib/environment`) - - expect(process.env['CYPRESS_INTERNAL_ENV']).to.eq(env) -} - -const setPkg = (env) => { - pkg.env = env - - return expectedEnv(env) -} - -const env = process.env['CYPRESS_INTERNAL_ENV'] - -describe('lib/environment', () => { - beforeEach(() => { - sinon.stub(Promise, 'config') - delete process.env['CYPRESS_INTERNAL_ENV'] - - return delete require.cache[require.resolve(`../../lib/environment`)] - }) - - afterEach(() => { - delete require.cache[require.resolve(`../../lib/environment`)] - - return delete process.env['CYPRESS_INTERNAL_ENV'] - }) - - after(() => { - return process.env['CYPRESS_INTERNAL_ENV'] = env - }) - - // @see https://github.com/electron/electron/issues/46538 - // @see https://github.com/cypress-io/cypress/issues/32361 - context('sets gtk-version=3 in Electron >= 36', () => { - it('sets launch args', () => { - sinon.stub(app.commandLine, 'appendSwitch') - require(`../../lib/environment`) - expect(app.commandLine.appendSwitch).to.have.been.calledWith('--gtk-version', '3') - }) - }) - - context('parses ELECTRON_EXTRA_LAUNCH_ARGS', () => { - let restore = null - - it('sets launch args', () => { - restore = mockedEnv({ - ELECTRON_EXTRA_LAUNCH_ARGS: '--foo --bar=baz --quux=true', - }) - - sinon.stub(app.commandLine, 'appendSwitch') - require(`../../lib/environment`) - expect(app.commandLine.appendSwitch).to.have.been.calledWith('--foo') - expect(app.commandLine.appendSwitch).to.have.been.calledWith('--bar', 'baz') - - expect(app.commandLine.appendSwitch).to.have.been.calledWith('--quux', 'true') - }) - - it('sets launch args with zero', () => { - restore = mockedEnv({ - ELECTRON_EXTRA_LAUNCH_ARGS: '--foo --bar=baz --quux=0', - }) - - sinon.stub(app.commandLine, 'appendSwitch') - require(`../../lib/environment`) - expect(app.commandLine.appendSwitch).to.have.been.calledWith('--foo') - expect(app.commandLine.appendSwitch).to.have.been.calledWith('--bar', 'baz') - - expect(app.commandLine.appendSwitch).to.have.been.calledWith('--quux', '0') - }) - - it('sets launch args with false', () => { - restore = mockedEnv({ - ELECTRON_EXTRA_LAUNCH_ARGS: '--foo --bar=baz --quux=false', - }) - - sinon.stub(app.commandLine, 'appendSwitch') - require(`../../lib/environment`) - expect(app.commandLine.appendSwitch).to.have.been.calledWith('--foo') - expect(app.commandLine.appendSwitch).to.have.been.calledWith('--bar', 'baz') - - expect(app.commandLine.appendSwitch).to.have.been.calledWith('--quux', 'false') - }) - - it('sets launch args with multiple values inside quotes', () => { - restore = mockedEnv({ - ELECTRON_EXTRA_LAUNCH_ARGS: `--foo --ipsum=0 --bar=--baz=quux --lorem='--ipsum=dolor --sit=amet'`, - }) - - sinon.stub(app.commandLine, 'appendSwitch') - require(`../../lib/environment`) - - expect(app.commandLine.appendSwitch).to.have.been.calledWith('--foo') - expect(app.commandLine.appendSwitch).to.have.been.calledWith('--ipsum', '0') - expect(app.commandLine.appendSwitch).to.have.been.calledWith('--bar', '--baz=quux') - expect(app.commandLine.appendSwitch).to.have.been.calledWith('--lorem', '--ipsum=dolor --sit=amet') - }) - - return afterEach(() => { - if (restore) { - return restore() - } - }) - }) - - context('#existing process.env.CYPRESS_INTERNAL_ENV', () => { - it('is production', () => { - return setEnv('production') - }) - - it('is development', () => { - return setEnv('development') - }) - - it('is staging', () => { - return setEnv('staging') - }) - }) - - context('uses package.json env', () => { - afterEach(() => { - return delete pkg.env - }) - - it('is production', () => { - return setPkg('production') - }) - - it('is staging', () => { - return setPkg('staging') - }) - - it('is test', () => { - return setPkg('test') - }) - }) - - context('it uses development by default', () => { - beforeEach(() => { - return sinon.stub(fs, 'readJsonSync').returns({}) - }) - - it('is development', () => { - return expectedEnv('development') - }) - }) - - context('it sets process.env.CYPRESS', () => { - it('sets CYPRESS=true when Cypress runs', () => { - expect(process.env['CYPRESS']).to.eq('true') - }) - }) -}) diff --git a/packages/server/test/unit/environment_spec.ts b/packages/server/test/unit/environment_spec.ts new file mode 100644 index 00000000000..3f73c6865aa --- /dev/null +++ b/packages/server/test/unit/environment_spec.ts @@ -0,0 +1,119 @@ +import Promise from 'bluebird' +import pkg from '@packages/root' +import { fs } from '../../lib/util/fs' +import { calculateCypressInternalEnv, configureLongStackTraces } from '../../lib/environment' + +const env = process.env['CYPRESS_INTERNAL_ENV'] + +describe('lib/environment', () => { + describe('calculateCypressInternalEnv', () => { + beforeEach(() => { + delete process.env['CYPRESS_INTERNAL_ENV'] + }) + + afterEach(() => { + delete pkg.env + delete process.env['CYPRESS_INTERNAL_ENV'] + }) + + after(() => { + process.env['CYPRESS_INTERNAL_ENV'] = env + }) + + context('#existing process.env.CYPRESS_INTERNAL_ENV', () => { + it('is production', () => { + process.env['CYPRESS_INTERNAL_ENV'] = 'production' + + const calculatedEnv = calculateCypressInternalEnv() + + expect(calculatedEnv).to.eq('production') + }) + + it('is development', () => { + process.env['CYPRESS_INTERNAL_ENV'] = 'development' + + const calculatedEnv = calculateCypressInternalEnv() + + expect(calculatedEnv).to.eq('development') + }) + + it('is staging', () => { + process.env['CYPRESS_INTERNAL_ENV'] = 'staging' + + const calculatedEnv = calculateCypressInternalEnv() + + expect(calculatedEnv).to.eq('staging') + }) + }) + + context('uses package.json env', () => { + it('is production', () => { + pkg.env = 'production' + + const calculatedEnv = calculateCypressInternalEnv() + + expect(calculatedEnv).to.eq('production') + }) + + it('is staging', () => { + pkg.env = 'staging' + + const calculatedEnv = calculateCypressInternalEnv() + + expect(calculatedEnv).to.eq('staging') + }) + + it('is test', () => { + pkg.env = 'test' + + const calculatedEnv = calculateCypressInternalEnv() + + expect(calculatedEnv).to.eq('test') + }) + }) + + context('it uses development by default', () => { + beforeEach(() => { + return sinon.stub(fs, 'readJsonSync').returns({}) + }) + + it('is development', () => { + const calculatedEnv = calculateCypressInternalEnv() + + expect(calculatedEnv).to.eq('development') + }) + }) + }) + + describe('configureLongStackTraces', () => { + beforeEach(() => { + sinon.stub(Promise, 'config') + }) + + afterEach(() => { + Promise.config.restore() + }) + + it('configures long stack traces if "development" is passed in as the environment', () => { + configureLongStackTraces('development') + + expect(Error.stackTraceLimit).to.eq(Infinity) + + expect(Promise.config).to.have.been.calledWith({ + cancellation: true, + longStackTraces: true, + }) + }) + + it('disables long stack traces in bluebird if value other than "development" is passed in as the environment', () => { + configureLongStackTraces('production') + + expect(Error.stackTraceLimit).to.eq(Infinity) + + expect(Promise.config).to.have.been.calledWith({ + cancellation: true, + longStackTraces: false, + }) + }) + }) +}) From f60cf6450050f61a55f7ab0e4fb72feef4a69242 Mon Sep 17 00:00:00 2001 From: Bill Glesias Date: Fri, 24 Oct 2025 13:32:39 -0400 Subject: [PATCH 2/3] fix test types --- packages/server/test/unit/append_electron_switches_spec.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/server/test/unit/append_electron_switches_spec.ts b/packages/server/test/unit/append_electron_switches_spec.ts index df1f67d8d1b..f35563dc8ec 100644 --- a/packages/server/test/unit/append_electron_switches_spec.ts +++ b/packages/server/test/unit/append_electron_switches_spec.ts @@ -98,7 +98,7 @@ describe('lib/append_electron_switches', () => { commandLine: { appendSwitch: sinon.stub(), }, - } as Electron.App + } as unknown as Electron.App appendElectronSwitches(mockApp) @@ -118,7 +118,7 @@ describe('lib/append_electron_switches', () => { commandLine: { appendSwitch: sinon.stub(), }, - } as Electron.App + } as unknown as Electron.App appendElectronSwitches(mockApp) expect(mockApp.commandLine.appendSwitch).to.have.been.calledWith('--foo') From 1b13a550eecd692eab2b4573c1940ce0e89aa0b7 Mon Sep 17 00:00:00 2001 From: Bill Glesias Date: Fri, 24 Oct 2025 14:30:47 -0400 Subject: [PATCH 3/3] internal env is test not development --- packages/server/test/spec_helper.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/server/test/spec_helper.js b/packages/server/test/spec_helper.js index 901ec78cee6..62f1bca5f32 100644 --- a/packages/server/test/spec_helper.js +++ b/packages/server/test/spec_helper.js @@ -3,7 +3,7 @@ const { enable, mockElectron } = require('./mockery_helper') const { configureLongStackTraces } = require('../lib/environment') -configureLongStackTraces('development') +configureLongStackTraces() const chai = require('chai') chai.use(require('chai-subset'))