repo
stringlengths
7
64
file_url
stringlengths
81
338
file_path
stringlengths
5
257
content
stringlengths
0
32.8k
language
stringclasses
1 value
license
stringclasses
7 values
commit_sha
stringlengths
40
40
retrieved_at
stringdate
2026-01-04 15:25:31
2026-01-05 01:50:38
truncated
bool
2 classes
cypress-io/cypress
https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/packages/server/test/specUtils.ts
packages/server/test/specUtils.ts
import _ from 'lodash' import mockfs from 'mock-fs' import path from 'path' export const getFsPath = (pathStr: string) => { return _.get(getFs(), _.compact(pathStr.split(path.sep))) } export const getFs = () => { const cwd = process.cwd().split(path.sep).slice(1) const recurse = (dir, d) => { if (_.isStrin...
typescript
MIT
409444f8ea51d8f14dec8d10510f78c4a5f42271
2026-01-04T15:36:58.228650Z
false
cypress-io/cypress
https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/packages/server/test/support/helpers/data-context-helper.ts
packages/server/test/support/helpers/data-context-helper.ts
// necessary to have mocha types working correctly // NOTE: this is the sinon version of @packages/data-context/test/unit/helper.ts and will eventually be replaced with the a different version import 'mocha' import path from 'path' import fs from 'fs-extra' import { Response } from 'cross-fetch' import Fixtures, { fix...
typescript
MIT
409444f8ea51d8f14dec8d10510f78c4a5f42271
2026-01-04T15:36:58.228650Z
false
cypress-io/cypress
https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/packages/server/test/support/helpers/deferred.ts
packages/server/test/support/helpers/deferred.ts
export const deferred = () => { let reject let resolve const promise = new Promise((_resolve, _reject) => { resolve = _resolve reject = _reject }) return { promise, resolve, reject } }
typescript
MIT
409444f8ea51d8f14dec8d10510f78c4a5f42271
2026-01-04T15:36:58.228650Z
false
cypress-io/cypress
https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/packages/server/test/support/fixtures/cloud/studio/test-studio.ts
packages/server/test/support/fixtures/cloud/studio/test-studio.ts
/// <reference types="cypress" /> import type { StudioServerShape, StudioServerDefaultShape, StudioEvent, StudioCDPClient } from '@packages/types' import type { Router } from 'express' import type { Socket } from '@packages/socket' class StudioServer implements StudioServerShape { initializeRoutes (router: Router):...
typescript
MIT
409444f8ea51d8f14dec8d10510f78c4a5f42271
2026-01-04T15:36:58.228650Z
false
cypress-io/cypress
https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/packages/server/test/support/fixtures/cloud/cy-prompt/test-cy-prompt.ts
packages/server/test/support/fixtures/cloud/cy-prompt/test-cy-prompt.ts
/// <reference types="cypress" /> import type { CyPromptServerShape, CyPromptServerDefaultShape, CyPromptCDPClient } from '@packages/types' import type { Router } from 'express' import type { Socket } from 'socket.io' class CyPromptServer implements CyPromptServerShape { initializeRoutes (router: Router): void { ...
typescript
MIT
409444f8ea51d8f14dec8d10510f78c4a5f42271
2026-01-04T15:36:58.228650Z
false
cypress-io/cypress
https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/packages/server/test/support/fixtures/cloud/protocol/test-protocol.ts
packages/server/test/support/fixtures/cloud/protocol/test-protocol.ts
import type Database from 'better-sqlite3' import type { AppCaptureProtocolInterface, CDPClient, ResponseStreamOptions } from '@packages/types' import { Readable } from 'stream' export class AppCaptureProtocol implements AppCaptureProtocolInterface { getDbMetadata (): { offset: number, size: number } { return { ...
typescript
MIT
409444f8ea51d8f14dec8d10510f78c4a5f42271
2026-01-04T15:36:58.228650Z
false
cypress-io/cypress
https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/packages/server/test/integration/cdp_spec.ts
packages/server/test/integration/cdp_spec.ts
process.env.NODE_TLS_REJECT_UNAUTHORIZED = '0' import Debug from 'debug' import _ from 'lodash' import WebSocket from 'ws' import { CdpCommand, CdpEvent } from '../../lib/browsers/cdp_automation' import { CriClient } from '../../lib/browsers/cri-client' import { expect, nock } from '../spec_helper' import pDefer from ...
typescript
MIT
409444f8ea51d8f14dec8d10510f78c4a5f42271
2026-01-04T15:36:58.228650Z
false
cypress-io/cypress
https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/packages/server/test/integration/video_capture_spec.ts
packages/server/test/integration/video_capture_spec.ts
const { expect, sinon } = require('../spec_helper') import * as videoCapture from '../../lib/video_capture' import path from 'path' import fse from 'fs-extra' import os from 'os' const image1Path = path.join(__dirname, '..', '..', '..', 'icons', 'assets', 'cypress.iconset', 'icon_16x16.png') const image2Path = path.jo...
typescript
MIT
409444f8ea51d8f14dec8d10510f78c4a5f42271
2026-01-04T15:36:58.228650Z
false
cypress-io/cypress
https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/packages/server/test/integration/run_spec.ts
packages/server/test/integration/run_spec.ts
import fs from 'fs' import fsExtra from 'fs-extra' import { run } from '../../lib/modes/run' import { ProjectConfigIpc } from '@packages/data-context/src/data/ProjectConfigIpc' import { FileDataSource } from '@packages/data-context/src/sources/FileDataSource' import browserUtils from '../../lib/browsers' import { fs as...
typescript
MIT
409444f8ea51d8f14dec8d10510f78c4a5f42271
2026-01-04T15:36:58.228650Z
false
cypress-io/cypress
https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/packages/server/test/integration/cloud/extract_atomic_spec.ts
packages/server/test/integration/cloud/extract_atomic_spec.ts
import path from 'path' import os from 'os' import fs from 'fs-extra' import tar from 'tar' import { extractAtomic } from '../../../lib/cloud/extract_atomic' import { expect } from '../../spec_helper' describe('extractAtomic integration', () => { let tempDir: string let archivePath: string let destinationPath: s...
typescript
MIT
409444f8ea51d8f14dec8d10510f78c4a5f42271
2026-01-04T15:36:58.228650Z
false
cypress-io/cypress
https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/packages/server/test/unit/capture_spec.ts
packages/server/test/unit/capture_spec.ts
/* eslint-disable no-console */ import * as capture from '../../lib/capture' describe('lib/capture', () => { afterEach(() => { return capture.restore() }) context('process.stdout.write', () => { beforeEach(function () { this.write = sinon.spy(process.stdout, 'write') this.captured = capture....
typescript
MIT
409444f8ea51d8f14dec8d10510f78c4a5f42271
2026-01-04T15:36:58.228650Z
false
cypress-io/cypress
https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/packages/server/test/unit/routes_spec.ts
packages/server/test/unit/routes_spec.ts
import type { NetworkProxy } from '@packages/proxy' import type HttpProxy from 'http-proxy' import type { RemoteStates } from '../../lib/remote_states' import chai, { expect } from 'chai' import sinon from 'sinon' import proxyquire from 'proxyquire' import { Cfg } from '../../lib/project-base' import '../spec_helper' ...
typescript
MIT
409444f8ea51d8f14dec8d10510f78c4a5f42271
2026-01-04T15:36:58.228650Z
false
cypress-io/cypress
https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/packages/server/test/unit/append_electron_switches_spec.ts
packages/server/test/unit/append_electron_switches_spec.ts
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(...
typescript
MIT
409444f8ea51d8f14dec8d10510f78c4a5f42271
2026-01-04T15:36:58.228650Z
false
cypress-io/cypress
https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/packages/server/test/unit/status_code_spec.ts
packages/server/test/unit/status_code_spec.ts
import * as statusCode from '../../lib/util/status_code' describe('lib/util/status_code', () => { context('.isOk', () => { it('numbers starting with 2xx and 3xx returns true', () => { return [200, 300, 301, 299, 302, 201, '200', '300'].forEach((code) => { expect(statusCode.isOk(code), `expected sta...
typescript
MIT
409444f8ea51d8f14dec8d10510f78c4a5f42271
2026-01-04T15:36:58.228650Z
false
cypress-io/cypress
https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/packages/server/test/unit/files_spec.ts
packages/server/test/unit/files_spec.ts
import { readFile, writeFile } from '../../lib/files' import FixturesHelper from '@tooling/system-tests' import { setCtx, makeDataContext, clearCtx } from '../../lib/makeDataContext' import { getCtx } from '@packages/data-context' let ctx describe('lib/files', () => { before(async function () { // Clear and set ...
typescript
MIT
409444f8ea51d8f14dec8d10510f78c4a5f42271
2026-01-04T15:36:58.228650Z
false
cypress-io/cypress
https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/packages/server/test/unit/environment_spec.ts
packages/server/test/unit/environment_spec.ts
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('calculateCypressInternalE...
typescript
MIT
409444f8ea51d8f14dec8d10510f78c4a5f42271
2026-01-04T15:36:58.228650Z
false
cypress-io/cypress
https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/packages/server/test/unit/exec_spec.ts
packages/server/test/unit/exec_spec.ts
import _ from 'lodash' import os from 'os' import * as exec from '../../lib/exec' const isWindows = () => { return os.platform() === 'win32' } const runCommand = function (cmd, options = {}) { _.defaults(options, { cmd, timeout: 10000, env: {}, failOnNonZeroExit: true, }) return exec.run(proc...
typescript
MIT
409444f8ea51d8f14dec8d10510f78c4a5f42271
2026-01-04T15:36:58.228650Z
false
cypress-io/cypress
https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/packages/server/test/unit/project_utils_spec.ts
packages/server/test/unit/project_utils_spec.ts
import Chai from 'chai' import path from 'path' import { getSpecUrl } from '../../lib/project_utils' import Fixtures from '@tooling/system-tests' const todosPath = Fixtures.projectPath('todos') const defaultProps: Parameters<typeof getSpecUrl>[0] = { browserUrl: 'http://localhost:8888/__/', projectRoot: todosPath...
typescript
MIT
409444f8ea51d8f14dec8d10510f78c4a5f42271
2026-01-04T15:36:58.228650Z
false
cypress-io/cypress
https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/packages/server/test/unit/remote_states.spec.ts
packages/server/test/unit/remote_states.spec.ts
require('../spec_helper') import chai, { expect } from 'chai' import chaiAsPromised from 'chai-as-promised' import chaiSubset from 'chai-subset' import sinonChai from '@cypress/sinon-chai' import Sinon from 'sinon' import { OriginBehavior } from '@packages/network-tools' import { RemoteStates, DEFAULT_DOMAIN_NAME } fr...
typescript
MIT
409444f8ea51d8f14dec8d10510f78c4a5f42271
2026-01-04T15:36:58.228650Z
false
cypress-io/cypress
https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/packages/server/test/unit/fixture_spec.ts
packages/server/test/unit/fixture_spec.ts
import path from 'path' import Promise from 'bluebird' import * as fixture from '../../lib/fixture' import { fs } from '../../lib/util/fs' import FixturesHelper from '@tooling/system-tests' import snapshot from 'snap-shot-it' import { setCtx, makeDataContext, clearCtx } from '../../lib/makeDataContext' import { getCtx ...
typescript
MIT
409444f8ea51d8f14dec8d10510f78c4a5f42271
2026-01-04T15:36:58.228650Z
false
cypress-io/cypress
https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/packages/server/test/unit/cohort_spec.ts
packages/server/test/unit/cohort_spec.ts
require('../spec_helper') import { Cohort } from '@packages/types' import { cache } from '../../lib/cache' import * as cohorts from '../../lib/cohorts' describe('lib/cohort', () => { context('.get', () => { it('calls cache.get', async () => { const cohortTest: Cohort = { name: 'testName', ...
typescript
MIT
409444f8ea51d8f14dec8d10510f78c4a5f42271
2026-01-04T15:36:58.228650Z
false
cypress-io/cypress
https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/packages/server/test/unit/cache_spec.ts
packages/server/test/unit/cache_spec.ts
import Promise from 'bluebird' import { cache } from '../../lib/cache' import { fs } from '../../lib/util/fs' describe('lib/cache', () => { beforeEach(async () => { await cache.remove() }) context('projects', () => { describe('#insertProject', () => { it('inserts project by path', async () => { ...
typescript
MIT
409444f8ea51d8f14dec8d10510f78c4a5f42271
2026-01-04T15:36:58.228650Z
false
cypress-io/cypress
https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/packages/server/test/unit/util/spec_writer_spec.ts
packages/server/test/unit/util/spec_writer_spec.ts
import { builders as b } from 'ast-types' import Promise from 'bluebird' import * as recast from 'recast' import sinon from 'sinon' import snapshot from 'snap-shot-it' import { expect } from 'chai' import Fixtures from '@tooling/system-tests' import { fs } from '../../../lib/util/fs' import { generateCypressCommand,...
typescript
MIT
409444f8ea51d8f14dec8d10510f78c4a5f42271
2026-01-04T15:36:58.228650Z
false
cypress-io/cypress
https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/packages/server/test/unit/util/editors_spec.ts
packages/server/test/unit/util/editors_spec.ts
import Bluebird from 'bluebird' import chai, { expect } from 'chai' import chaiAsPromised from 'chai-as-promised' import chaiSubset from 'chai-subset' import sinonChai from '@cypress/sinon-chai' import sinon from 'sinon' import * as shellUtil from '../../../lib/util/shell' import * as envEditors from '../../../lib/uti...
typescript
MIT
409444f8ea51d8f14dec8d10510f78c4a5f42271
2026-01-04T15:36:58.228650Z
false
cypress-io/cypress
https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/packages/server/test/unit/util/ensure_url_spec.ts
packages/server/test/unit/util/ensure_url_spec.ts
import '../../spec_helper' import { connect, agent } from '@packages/network' import { isListening } from '../../../lib/util/ensure-url' import sinon from 'sinon' import nock from 'nock' describe('lib/util/ensure-url', function () { context('.isListening', function () { it('resolves if a URL connects', function...
typescript
MIT
409444f8ea51d8f14dec8d10510f78c4a5f42271
2026-01-04T15:36:58.228650Z
false
cypress-io/cypress
https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/packages/server/test/unit/util/socket_allowed_spec.ts
packages/server/test/unit/util/socket_allowed_spec.ts
import '../../spec_helper' import { expect } from 'chai' import { Request } from 'express' import { SocketAllowed } from '../../../lib/util/socket_allowed' import { EventEmitter } from 'events' import { Socket } from 'net' describe('lib/util/socket_allowed', function () { let sw: SocketAllowed beforeEach(() => {...
typescript
MIT
409444f8ea51d8f14dec8d10510f78c4a5f42271
2026-01-04T15:36:58.228650Z
false
cypress-io/cypress
https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/packages/server/test/unit/util/tty_spec.ts
packages/server/test/unit/util/tty_spec.ts
import tty from 'tty' import * as ttyUtil from '../../../lib/util/tty' import * as terminalSize from '../../../lib/util/terminal-size' const ttys = [process.stdin.isTTY, process.stdout.isTTY, process.stderr.isTTY] describe('lib/util/tty', () => { context('getWindowSize', () => { it('polyfills stdout and stderr ...
typescript
MIT
409444f8ea51d8f14dec8d10510f78c4a5f42271
2026-01-04T15:36:58.228650Z
false
cypress-io/cypress
https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/packages/server/test/unit/util/random_spec.ts
packages/server/test/unit/util/random_spec.ts
import randomstring from 'randomstring' import { id as randomId } from '../../../lib/util/random' context('.id', () => { it('returns random.generate string with length 5 by default', () => { sinon.spy(randomstring, 'generate') const id = randomId() expect(id.length).to.eq(5) expect(randomstring.ge...
typescript
MIT
409444f8ea51d8f14dec8d10510f78c4a5f42271
2026-01-04T15:36:58.228650Z
false
cypress-io/cypress
https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/packages/server/test/unit/util/newlines_spec.ts
packages/server/test/unit/util/newlines_spec.ts
import '../../spec_helper' import newlines from '../../../lib/util/newlines' describe('lib/util/newlines', function () { it('inserts newline at each n char', function () { expect(newlines.addNewlineAtEveryNChar('123456789', 3)).to.eq('123\n456\n789') }) }) describe('lib/util/newlines', function () { it('re...
typescript
MIT
409444f8ea51d8f14dec8d10510f78c4a5f42271
2026-01-04T15:36:58.228650Z
false
cypress-io/cypress
https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/packages/server/test/unit/util/file_spec.ts
packages/server/test/unit/util/file_spec.ts
import os from 'os' import path from 'path' import Promise from 'bluebird' import lockFileModule from 'lockfile' import { fs } from '../../../lib/util/fs' import * as env from '../../../lib/util/env' import exit from '../../../lib/util/exit' import { File as FileUtil } from '../../../lib/util/file' const lockFile = Pr...
typescript
MIT
409444f8ea51d8f14dec8d10510f78c4a5f42271
2026-01-04T15:36:58.228650Z
false
cypress-io/cypress
https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/packages/server/test/unit/util/find_process_spec.ts
packages/server/test/unit/util/find_process_spec.ts
import utils from 'find-process/lib/utils' import { sinon } from '../../spec_helper' import { byPid } from '../../../lib/util/find_process' describe('lib/util/find_process', function () { // This is testing the patch for find-process to handle windows processes that have a mixture of carriage returns it('does not ...
typescript
MIT
409444f8ea51d8f14dec8d10510f78c4a5f42271
2026-01-04T15:36:58.228650Z
false
cypress-io/cypress
https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/packages/server/test/unit/util/process_profiler_spec.ts
packages/server/test/unit/util/process_profiler_spec.ts
import '../../spec_helper' import _ from 'lodash' import si from 'systeminformation' import { expect } from 'chai' import { groupCyProcesses, _renameBrowserGroup, _aggregateGroups, _reset, } from '../../../lib/util/process_profiler' import sinon from 'sinon' import snapshot from 'snap-shot-it' const browsers ...
typescript
MIT
409444f8ea51d8f14dec8d10510f78c4a5f42271
2026-01-04T15:36:58.228650Z
false
cypress-io/cypress
https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/packages/server/test/unit/util/resourceTypeAndCredential_spec.ts
packages/server/test/unit/util/resourceTypeAndCredential_spec.ts
import { expect } from 'chai' import { resourceTypeAndCredentialManager } from '../../../lib/util/resourceTypeAndCredentialManager' context('resourceTypeAndCredentialManager Singleton', () => { beforeEach(() => { resourceTypeAndCredentialManager.clear() resourceTypeAndCredentialManager.set({ url: 'www....
typescript
MIT
409444f8ea51d8f14dec8d10510f78c4a5f42271
2026-01-04T15:36:58.228650Z
false
cypress-io/cypress
https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/packages/server/test/unit/util/async_retry_spec.ts
packages/server/test/unit/util/async_retry_spec.ts
import { asyncRetry } from '../../../lib/util/async_retry' import sinon from 'sinon' import chai from 'chai' import sinonChai from '@cypress/sinon-chai' chai.use(sinonChai) const { expect } = chai describe('asyncRetry', () => { let asyncFn const resolution = { result: 'success' } beforeEach(() => { asyncFn...
typescript
MIT
409444f8ea51d8f14dec8d10510f78c4a5f42271
2026-01-04T15:36:58.228650Z
false
cypress-io/cypress
https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/packages/server/test/unit/util/terminal_spec.ts
packages/server/test/unit/util/terminal_spec.ts
import snapshot from 'snap-shot-it' import stripAnsi from 'strip-ansi' import widestLine from 'widest-line' import * as env from '../../../lib/util/env' import * as terminal from '../../../lib/util/terminal' import * as terminalSize from '../../../lib/util/terminal-size' const sanitizeSnapshot = (str) => { return sn...
typescript
MIT
409444f8ea51d8f14dec8d10510f78c4a5f42271
2026-01-04T15:36:58.228650Z
false
cypress-io/cypress
https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/packages/server/test/unit/util/obj_utils_spec.ts
packages/server/test/unit/util/obj_utils_spec.ts
import * as objUtils from '../../../lib/util/obj_utils' import { expect } from 'chai' const { each, remapKeys, renameKey, setValue, remove } = objUtils describe('obj_utils', () => { context('#remapKeys', () => { it('returns cloned object with renamed, removed, and modified key/values', () => { const initi...
typescript
MIT
409444f8ea51d8f14dec8d10510f78c4a5f42271
2026-01-04T15:36:58.228650Z
false
cypress-io/cypress
https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/packages/server/test/unit/util/suppress_warnings_spec.ts
packages/server/test/unit/util/suppress_warnings_spec.ts
import '../../spec_helper' import { expect } from 'chai' import execa from 'execa' import proxyquire from 'proxyquire' const ERROR_MESSAGE = 'Setting the NODE_TLS_REJECT_UNAUTHORIZED' const TLS_CONNECT = `require('tls').connect('5000').on('error', ()=>{});` const SUPPRESS_WARNING = `require('${__dirname}/../../../lib...
typescript
MIT
409444f8ea51d8f14dec8d10510f78c4a5f42271
2026-01-04T15:36:58.228650Z
false
cypress-io/cypress
https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/packages/server/test/unit/util/trash_spec.ts
packages/server/test/unit/util/trash_spec.ts
import fs from 'fs' import os from 'os' import path from 'path' import trash from '../../../lib/util/trash' import sinon from 'sinon' import { expect } from 'chai' require('../../spec_helper') // Creates test directories and files for trash testing const populateDirectories = (basePath: string): void => { fs.mkdirS...
typescript
MIT
409444f8ea51d8f14dec8d10510f78c4a5f42271
2026-01-04T15:36:58.228650Z
false
cypress-io/cypress
https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/packages/server/test/unit/browsers/firefox-util_spec.ts
packages/server/test/unit/browsers/firefox-util_spec.ts
require('../../spec_helper') import FirefoxUtil from '../../../lib/browsers/firefox-util' import sinon from 'sinon' import { expect } from 'chai' import { Automation } from '../../../lib/automation' import { Client as WebDriverClient } from 'webdriver' import { BidiAutomation } from '../../../lib/browsers/bidi_automati...
typescript
MIT
409444f8ea51d8f14dec8d10510f78c4a5f42271
2026-01-04T15:36:58.228650Z
false
cypress-io/cypress
https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/packages/server/test/unit/browsers/bidi_automation_spec.ts
packages/server/test/unit/browsers/bidi_automation_spec.ts
import EventEmitter from 'node:events' import type { Client as WebDriverClient } from 'webdriver' import { expect } from 'chai' import sinon from 'sinon' import { toInteger } from 'lodash' import { BidiAutomation } from '../../../lib/browsers/bidi_automation' import type { NetworkBeforeRequestSentParametersModified } f...
typescript
MIT
409444f8ea51d8f14dec8d10510f78c4a5f42271
2026-01-04T15:36:58.228650Z
true
cypress-io/cypress
https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/packages/server/test/unit/browsers/cdp-connection_spec.ts
packages/server/test/unit/browsers/cdp-connection_spec.ts
import type CDP from 'chrome-remote-interface' import type { CdpClient, CDPConnection, CDPConnectionOptions } from '../../../lib/browsers/cdp-connection' import type { debugCdpConnection } from '../../../lib/browsers/debug-cdp-connection' import type { CdpEvent, CdpCommand } from '../../../lib/browsers/cdp_automation' ...
typescript
MIT
409444f8ea51d8f14dec8d10510f78c4a5f42271
2026-01-04T15:36:58.228650Z
false
cypress-io/cypress
https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/packages/server/test/unit/browsers/protocol_spec.ts
packages/server/test/unit/browsers/protocol_spec.ts
import '../../spec_helper' import 'chai-as-promised' // for the types! import { expect } from 'chai' import humanInterval from 'human-interval' import _ from 'lodash' import sinon from 'sinon' import snapshot from 'snap-shot-it' import stripAnsi from 'strip-ansi' import { connect } from '@packages/network' import * as ...
typescript
MIT
409444f8ea51d8f14dec8d10510f78c4a5f42271
2026-01-04T15:36:58.228650Z
false
cypress-io/cypress
https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/packages/server/test/unit/browsers/firefox_spec.ts
packages/server/test/unit/browsers/firefox_spec.ts
require('../../spec_helper') import 'chai-as-promised' import { expect } from 'chai' import debug from 'debug' import os from 'os' import sinon from 'sinon' import fsExtra from 'fs-extra' import * as firefox from '../../../lib/browsers/firefox' import { type Client as WebDriverClient, default as webdriver } from 'webdr...
typescript
MIT
409444f8ea51d8f14dec8d10510f78c4a5f42271
2026-01-04T15:36:58.228650Z
false
cypress-io/cypress
https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/packages/server/test/unit/browsers/cdp-command-queue_spec.ts
packages/server/test/unit/browsers/cdp-command-queue_spec.ts
import { CDPCommandQueue, Command } from '../../../lib/browsers/cdp-command-queue' import type ProtocolMapping from 'devtools-protocol/types/protocol-mapping' import pDeferred from 'p-defer' import _ from 'lodash' const { expect } = require('../../spec_helper') function matchCommand (search: Partial<Command<any>>) { ...
typescript
MIT
409444f8ea51d8f14dec8d10510f78c4a5f42271
2026-01-04T15:36:58.228650Z
false
cypress-io/cypress
https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/packages/server/test/unit/browsers/webkit_spec.ts
packages/server/test/unit/browsers/webkit_spec.ts
import { proxyquire } from '../../spec_helper' import { expect } from 'chai' import utils from '../../../lib/browsers/utils' import * as plugins from '../../../lib/plugins' function getWebkit (dependencies = {}) { return proxyquire('../lib/browsers/webkit', dependencies) as typeof import('../../../lib/browsers/webki...
typescript
MIT
409444f8ea51d8f14dec8d10510f78c4a5f42271
2026-01-04T15:36:58.228650Z
false
cypress-io/cypress
https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/packages/server/test/unit/browsers/cdp_automation_spec.ts
packages/server/test/unit/browsers/cdp_automation_spec.ts
const { expect, sinon } = require('../../spec_helper') import { ProtocolManagerShape } from '@packages/types' import { CdpAutomation } from '../../../lib/browsers/cdp_automation' context('lib/browsers/cdp_automation', () => { context('.CdpAutomation', () => { let cdpAutomation: CdpAutomation describe('crea...
typescript
MIT
409444f8ea51d8f14dec8d10510f78c4a5f42271
2026-01-04T15:36:58.228650Z
false
cypress-io/cypress
https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/packages/server/test/unit/browsers/cri-client_spec.ts
packages/server/test/unit/browsers/cri-client_spec.ts
import type ProtocolMapping from 'devtools-protocol/types/protocol-mapping' import EventEmitter from 'events' import { ProtocolManagerShape } from '@packages/types' import type { CriClient } from '../../../lib/browsers/cri-client' import pDefer from 'p-defer' import type Protocol from 'devtools-protocol' const { expect...
typescript
MIT
409444f8ea51d8f14dec8d10510f78c4a5f42271
2026-01-04T15:36:58.228650Z
false
cypress-io/cypress
https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/packages/server/test/unit/browsers/browser-cri-client_spec.ts
packages/server/test/unit/browsers/browser-cri-client_spec.ts
import { BrowserCriClient } from '../../../lib/browsers/browser-cri-client' import { CriClient } from '../../../lib/browsers/cri-client' import { expect, proxyquire, sinon } from '../../spec_helper' import * as protocol from '../../../lib/browsers/protocol' import { stripAnsi } from '@packages/errors' import net from '...
typescript
MIT
409444f8ea51d8f14dec8d10510f78c4a5f42271
2026-01-04T15:36:58.228650Z
true
cypress-io/cypress
https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/packages/server/test/unit/browsers/browsers_spec.ts
packages/server/test/unit/browsers/browsers_spec.ts
import '../../spec_helper' import stripAnsi from 'strip-ansi' import os from 'os' import chalk from 'chalk' import browsers from '../../../lib/browsers' import utils from '../../../lib/browsers/utils' import snapshot from 'snap-shot-it' import { EventEmitter } from 'events' import { exec } from 'child_process' import ...
typescript
MIT
409444f8ea51d8f14dec8d10510f78c4a5f42271
2026-01-04T15:36:58.228650Z
false
cypress-io/cypress
https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/packages/server/test/unit/browsers/memory/cgroup-v1_spec.ts
packages/server/test/unit/browsers/memory/cgroup-v1_spec.ts
const { expect, sinon } = require('../../../spec_helper') import util from 'util' describe('lib/browsers/memory/cgroup-v1', () => { let mockExec let memory before(async () => { mockExec = sinon.stub() sinon.stub(util, 'promisify').returns(mockExec) memory = require('../../../../lib/browsers/memor...
typescript
MIT
409444f8ea51d8f14dec8d10510f78c4a5f42271
2026-01-04T15:36:58.228650Z
false
cypress-io/cypress
https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/packages/server/test/unit/browsers/memory/memory_spec.ts
packages/server/test/unit/browsers/memory/memory_spec.ts
import os from 'os' import si from 'systeminformation' import fs from 'fs-extra' import browsers from '../../../../lib/browsers' import { proxyquire, expect, sinon } from '../../../spec_helper' import { Automation } from '../../../../lib/automation' describe('lib/browsers/memory', () => { let memory: typeof import('...
typescript
MIT
409444f8ea51d8f14dec8d10510f78c4a5f42271
2026-01-04T15:36:58.228650Z
false
cypress-io/cypress
https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/packages/server/test/unit/browsers/memory/default_spec.ts
packages/server/test/unit/browsers/memory/default_spec.ts
const { expect, sinon } = require('../../../spec_helper') import os from 'os' import si from 'systeminformation' import memory from '../../../../lib/browsers/memory/default' describe('lib/browsers/memory', () => { context('#getTotalMemoryLimit', () => { it('returns total memory limit from os', async () => { ...
typescript
MIT
409444f8ea51d8f14dec8d10510f78c4a5f42271
2026-01-04T15:36:58.228650Z
false
cypress-io/cypress
https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/packages/server/test/unit/cloud/protocol_spec.ts
packages/server/test/unit/cloud/protocol_spec.ts
import { proxyquire, sinon } from '../../spec_helper' import path from 'path' import os from 'os' import type { AppCaptureProtocolInterface, ProtocolManagerShape } from '@packages/types' import { expect } from 'chai' import { EventEmitter } from 'stream' import esbuild from 'esbuild' import fs from 'fs-extra' import ty...
typescript
MIT
409444f8ea51d8f14dec8d10510f78c4a5f42271
2026-01-04T15:36:58.228650Z
false
cypress-io/cypress
https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/packages/server/test/unit/cloud/get_cloud_metadata_spec.ts
packages/server/test/unit/cloud/get_cloud_metadata_spec.ts
import { sinon } from '../../spec_helper' import { CloudDataSource } from '@packages/data-context/src/sources' import { getCloudMetadata } from '../../../lib/cloud/get_cloud_metadata' describe('getCloudMetadata', () => { let mockCloudDataSource: CloudDataSource let originalCypressConfigEnv: string | undefined = pr...
typescript
MIT
409444f8ea51d8f14dec8d10510f78c4a5f42271
2026-01-04T15:36:58.228650Z
false
cypress-io/cypress
https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/packages/server/test/unit/cloud/extract_atomic_spec.ts
packages/server/test/unit/cloud/extract_atomic_spec.ts
import path from 'path' import { proxyquire, sinon } from '../../spec_helper' import { EventEmitter } from 'events' import { Readable } from 'stream' describe('extractAtomic', () => { let extractAtomic: typeof import('../../../lib/cloud/extract_atomic').extractAtomic let createReadStreamStub: sinon.SinonStub let...
typescript
MIT
409444f8ea51d8f14dec8d10510f78c4a5f42271
2026-01-04T15:36:58.228650Z
false
cypress-io/cypress
https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/packages/server/test/unit/cloud/environment_spec.ts
packages/server/test/unit/cloud/environment_spec.ts
import '../../spec_helper' import getEnvInformationForProjectRoot from '../../../lib/cloud/environment' import path from 'path' import base64url from 'base64url' import { exec } from 'child_process' import originalResolvePackagePath from 'resolve-package-path' import proxyquire from 'proxyquire' describe('lib/cloud/en...
typescript
MIT
409444f8ea51d8f14dec8d10510f78c4a5f42271
2026-01-04T15:36:58.228650Z
false
cypress-io/cypress
https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/packages/server/test/unit/cloud/require_script_spec.ts
packages/server/test/unit/cloud/require_script_spec.ts
import { expect } from 'chai' import { requireScript } from '../../../lib/cloud/require_script' describe('require_script', () => { it('requires the script correctly', () => { const script = ` module.exports = { StudioManager: class { constructor ({ studioPath }) { this.studioP...
typescript
MIT
409444f8ea51d8f14dec8d10510f78c4a5f42271
2026-01-04T15:36:58.228650Z
false
cypress-io/cypress
https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/packages/server/test/unit/cloud/studio/StudioLifecycleManager_spec.ts
packages/server/test/unit/cloud/studio/StudioLifecycleManager_spec.ts
import { proxyquire } from '../../../spec_helper' import sinon from 'sinon' import { expect } from 'chai' import { StudioManager } from '../../../../lib/cloud/studio/studio' import { StudioLifecycleManager } from '../../../../lib/cloud/studio/StudioLifecycleManager' import type { DataContext } from '@packages/data-cont...
typescript
MIT
409444f8ea51d8f14dec8d10510f78c4a5f42271
2026-01-04T15:36:58.228650Z
true
cypress-io/cypress
https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/packages/server/test/unit/cloud/studio/studio_spec.ts
packages/server/test/unit/cloud/studio/studio_spec.ts
import { proxyquire, sinon } from '../../../spec_helper' import path from 'path' import type { StudioServerShape } from '@packages/types' import { expect } from 'chai' import esbuild from 'esbuild' import type { StudioManager as StudioManagerShape } from '@packages/server/lib/cloud/studio/studio' import os from 'os' c...
typescript
MIT
409444f8ea51d8f14dec8d10510f78c4a5f42271
2026-01-04T15:36:58.228650Z
false
cypress-io/cypress
https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/packages/server/test/unit/cloud/studio/StudioElectron_spec.ts
packages/server/test/unit/cloud/studio/StudioElectron_spec.ts
import { sinon, proxyquire } from '../../../spec_helper' import { expect } from 'chai' describe('StudioElectron', () => { class FakeBrowserWindow { public options: any private destroyed = false constructor (options: any) { this.options = options } isDestroyed () { return this.destro...
typescript
MIT
409444f8ea51d8f14dec8d10510f78c4a5f42271
2026-01-04T15:36:58.228650Z
false
cypress-io/cypress
https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/packages/server/test/unit/cloud/studio/ensure_studio_bundle_spec.ts
packages/server/test/unit/cloud/studio/ensure_studio_bundle_spec.ts
import path from 'path' import os from 'os' import { proxyquire, sinon } from '../../../spec_helper' describe('ensureStudioBundle', () => { let ensureStudioBundle: typeof import('../../../../lib/cloud/studio/ensure_studio_bundle').ensureStudioBundle let tmpdir: string = '/tmp' let rmStub: sinon.SinonStub = sinon...
typescript
MIT
409444f8ea51d8f14dec8d10510f78c4a5f42271
2026-01-04T15:36:58.228650Z
false
cypress-io/cypress
https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/packages/server/test/unit/cloud/studio/telemetry/TelemetryReporter_spec.ts
packages/server/test/unit/cloud/studio/telemetry/TelemetryReporter_spec.ts
import { MEASURE_NAMES, TELEMETRY_GROUP_NAMES, } from '../../../../../lib/cloud/studio/telemetry/TelemetryManager' import { expect } from 'chai' import { proxyquire, sinon } from '../../../../spec_helper' proxyquire.noPreserveCache() describe('TelemetryReporter', () => { let TelemetryReporter: typeof import('.....
typescript
MIT
409444f8ea51d8f14dec8d10510f78c4a5f42271
2026-01-04T15:36:58.228650Z
false
cypress-io/cypress
https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/packages/server/test/unit/cloud/studio/telemetry/TelemetryManager_spec.ts
packages/server/test/unit/cloud/studio/telemetry/TelemetryManager_spec.ts
import { performance } from 'perf_hooks' import { telemetryManager, MARK_NAMES, MEASURE_NAMES, TELEMETRY_GROUP_NAMES, } from '../../../../../lib/cloud/studio/telemetry/TelemetryManager' import { expect } from 'chai' // Helper function to create a controlled delay const delay = (ms: number) => new Promise((reso...
typescript
MIT
409444f8ea51d8f14dec8d10510f78c4a5f42271
2026-01-04T15:36:58.228650Z
false
cypress-io/cypress
https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/packages/server/test/unit/cloud/artifacts/print_protocol_upload_error_spec.ts
packages/server/test/unit/cloud/artifacts/print_protocol_upload_error_spec.ts
import { proxyquire, expect } from '../../../spec_helper' import sinon from 'sinon' import { HttpError } from '../../../../lib/cloud/network/http_error' import { SystemError } from '../../../../lib/cloud/network/system_error' import { StreamStalledError } from '../../../../lib/cloud/upload/stream_stalled_error' import ...
typescript
MIT
409444f8ea51d8f14dec8d10510f78c4a5f42271
2026-01-04T15:36:58.228650Z
false
cypress-io/cypress
https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/packages/server/test/unit/cloud/api/put_protocol_artifact_spec.ts
packages/server/test/unit/cloud/api/put_protocol_artifact_spec.ts
import mockery from 'mockery' import { enable as enableMockery, mockElectron } from '../../../mockery_helper' import sinon from 'sinon' import chai, { expect } from 'chai' import sinonChai from 'sinon-chai' import chaiAsPromised from 'chai-as-promised' import { ReadStream } from 'fs' import { StreamActivityMonitor } f...
typescript
MIT
409444f8ea51d8f14dec8d10510f78c4a5f42271
2026-01-04T15:36:58.228650Z
false
cypress-io/cypress
https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/packages/server/test/unit/cloud/api/transform_error_spec.ts
packages/server/test/unit/cloud/api/transform_error_spec.ts
import { expect } from 'chai' import { installErrorTransform } from '../../../../lib/cloud/api/axios_middleware/transform_error' import { AxiosError, AxiosResponse, AxiosInstance } from 'axios' import sinon, { SinonSpy } from 'sinon' describe('transformError', () => { const status = 400 const errorData = { message...
typescript
MIT
409444f8ea51d8f14dec8d10510f78c4a5f42271
2026-01-04T15:36:58.228650Z
false
cypress-io/cypress
https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/packages/server/test/unit/cloud/api/cloud_request_encryption_spec.ts
packages/server/test/unit/cloud/api/cloud_request_encryption_spec.ts
import express, { Request, Response } from 'express' import crypto from 'crypto' import { expect } from 'chai' import fs from 'fs' import { DestroyableProxy, fakeServer } from './utils/fake_proxy_server' import bodyParser from 'body-parser' import { TEST_PRIVATE } from '@tooling/system-tests/lib/protocol-stubs/protoco...
typescript
MIT
409444f8ea51d8f14dec8d10510f78c4a5f42271
2026-01-04T15:36:58.228650Z
false
cypress-io/cypress
https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/packages/server/test/unit/cloud/api/create_instance_spec.ts
packages/server/test/unit/cloud/api/create_instance_spec.ts
import chai from 'chai' import nock from 'nock' import sinonChai from 'sinon-chai' import pkg from '@packages/root' import { createInstance as axiosCreateInstance, CreateInstanceRequestBody, CreateInstanceResponse } from '../../../../lib/cloud/api/create_instance' import api from '../../../../lib/cloud/api' chai.use(...
typescript
MIT
409444f8ea51d8f14dec8d10510f78c4a5f42271
2026-01-04T15:36:58.228650Z
false
cypress-io/cypress
https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/packages/server/test/unit/cloud/api/cloud_request_spec.ts
packages/server/test/unit/cloud/api/cloud_request_spec.ts
import sinon from 'sinon' import sinonChai from 'sinon-chai' import chai, { expect } from 'chai' import { agent, strictAgent } from '@packages/network' import axios, { CreateAxiosDefaults, AxiosInstance } from 'axios' import debugLib from 'debug' import stripAnsi from 'strip-ansi' import { CloudRequest, createCloudRequ...
typescript
MIT
409444f8ea51d8f14dec8d10510f78c4a5f42271
2026-01-04T15:36:58.228650Z
false
cypress-io/cypress
https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/packages/server/test/unit/cloud/api/studio/post_studio_session_spec.ts
packages/server/test/unit/cloud/api/studio/post_studio_session_spec.ts
import { SystemError } from '../../../../../lib/cloud/network/system_error' import { proxyquire } from '../../../../spec_helper' import os from 'os' import pkg from '@packages/root' import { ParseKinds } from '../../../../../lib/cloud/network/fetch' import sinon from 'sinon' describe('postStudioSession', () => { let...
typescript
MIT
409444f8ea51d8f14dec8d10510f78c4a5f42271
2026-01-04T15:36:58.228650Z
false
cypress-io/cypress
https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/packages/server/test/unit/cloud/api/studio/get_studio_bundle_spec.ts
packages/server/test/unit/cloud/api/studio/get_studio_bundle_spec.ts
import { proxyquire } from '../../../../spec_helper' import { Readable, Writable } from 'stream' import { HttpError } from '../../../../../lib/cloud/network/http_error' import sinon from 'sinon' describe('getStudioBundle', () => { let writeResult: string let readStream: Readable let createWriteStreamStub: sinon....
typescript
MIT
409444f8ea51d8f14dec8d10510f78c4a5f42271
2026-01-04T15:36:58.228650Z
false
cypress-io/cypress
https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/packages/server/test/unit/cloud/api/studio/report_studio_error_spec.ts
packages/server/test/unit/cloud/api/studio/report_studio_error_spec.ts
import { expect } from 'chai' import { sinon } from '../../../../spec_helper' import { reportStudioError } from '@packages/server/lib/cloud/api/studio/report_studio_error' import { START_TAG, END_TAG } from '@packages/stderr-filtering' describe('lib/cloud/api/studio/report_studio_error', () => { let cloudRequestStub...
typescript
MIT
409444f8ea51d8f14dec8d10510f78c4a5f42271
2026-01-04T15:36:58.228650Z
false
cypress-io/cypress
https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/packages/server/test/unit/cloud/api/utils/fake_proxy_server.ts
packages/server/test/unit/cloud/api/utils/fake_proxy_server.ts
import http from 'http' import { AddressInfo } from 'net' import express, { Application } from 'express' import Promise from 'bluebird' import debugLib from 'debug' import DebuggingProxy from '@cypress/debugging-proxy' import getPort from 'get-port' import { CA } from '@packages/https-proxy' import { allowDestroy } fro...
typescript
MIT
409444f8ea51d8f14dec8d10510f78c4a5f42271
2026-01-04T15:36:58.228650Z
false
cypress-io/cypress
https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/packages/server/test/unit/cloud/api/cy-prompt/get_cy_prompt_bundle_spec.ts
packages/server/test/unit/cloud/api/cy-prompt/get_cy_prompt_bundle_spec.ts
import { proxyquire } from '../../../../spec_helper' import { Readable, Writable } from 'stream' import { HttpError } from '../../../../../lib/cloud/network/http_error' import sinon from 'sinon' describe('getCyPromptBundle', () => { let writeResult: string let readStream: Readable let createWriteStreamStub: sino...
typescript
MIT
409444f8ea51d8f14dec8d10510f78c4a5f42271
2026-01-04T15:36:58.228650Z
false
cypress-io/cypress
https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/packages/server/test/unit/cloud/api/cy-prompt/report_cy_prompt_error_spec.ts
packages/server/test/unit/cloud/api/cy-prompt/report_cy_prompt_error_spec.ts
import { expect } from 'chai' import { sinon } from '../../../../spec_helper' import { reportCyPromptError } from '@packages/server/lib/cloud/api/cy-prompt/report_cy_prompt_error' describe('lib/cloud/api/cy-prompt/report_cy_prompt_error', () => { let cloudRequestStub: sinon.SinonStub let cloudApi: any let oldNod...
typescript
MIT
409444f8ea51d8f14dec8d10510f78c4a5f42271
2026-01-04T15:36:58.228650Z
false
cypress-io/cypress
https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/packages/server/test/unit/cloud/api/cy-prompt/post_cy_prompt_session_spec.ts
packages/server/test/unit/cloud/api/cy-prompt/post_cy_prompt_session_spec.ts
import { SystemError } from '../../../../../lib/cloud/network/system_error' import { proxyquire } from '../../../../spec_helper' import os from 'os' import pkg from '@packages/root' import { ParseKinds } from '../../../../../lib/cloud/network/fetch' import sinon from 'sinon' describe('postCyPromptSession', () => { l...
typescript
MIT
409444f8ea51d8f14dec8d10510f78c4a5f42271
2026-01-04T15:36:58.228650Z
false
cypress-io/cypress
https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/packages/server/test/unit/cloud/upload/stream_activity_monitor_spec.ts
packages/server/test/unit/cloud/upload/stream_activity_monitor_spec.ts
const { sinon, expect } = require('../../../spec_helper') import { StreamActivityMonitor } from '../../../../lib/cloud/upload/stream_activity_monitor' import { StreamStalledError } from '../../../../lib/cloud/upload/stream_stalled_error' import { Readable, Writable } from 'stream' describe('StreamTimeoutController', ...
typescript
MIT
409444f8ea51d8f14dec8d10510f78c4a5f42271
2026-01-04T15:36:58.228650Z
false
cypress-io/cypress
https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/packages/server/test/unit/cloud/cy-prompt/CyPromptLifecycleManager_spec.ts
packages/server/test/unit/cloud/cy-prompt/CyPromptLifecycleManager_spec.ts
import { sinon, proxyquire } from '../../../spec_helper' import { expect } from 'chai' import { CyPromptManager } from '../../../../lib/cloud/cy-prompt/CyPromptManager' import { CyPromptLifecycleManager } from '../../../../lib/cloud/cy-prompt/CyPromptLifecycleManager' import type { DataContext } from '@packages/data-co...
typescript
MIT
409444f8ea51d8f14dec8d10510f78c4a5f42271
2026-01-04T15:36:58.228650Z
false
cypress-io/cypress
https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/packages/server/test/unit/cloud/cy-prompt/ensure_cy_prompt_bundle_spec.ts
packages/server/test/unit/cloud/cy-prompt/ensure_cy_prompt_bundle_spec.ts
import path from 'path' import os from 'os' import { proxyquire, sinon } from '../../../spec_helper' describe('ensureCyPromptBundle', () => { let ensureCyPromptBundle: typeof import('../../../../lib/cloud/cy-prompt/ensure_cy_prompt_bundle').ensureCyPromptBundle let tmpdir: string = '/tmp' let rmStub: sinon.Sinon...
typescript
MIT
409444f8ea51d8f14dec8d10510f78c4a5f42271
2026-01-04T15:36:58.228650Z
false
cypress-io/cypress
https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/packages/server/test/unit/cloud/cy-prompt/CyPromptManager_spec.ts
packages/server/test/unit/cloud/cy-prompt/CyPromptManager_spec.ts
import { proxyquire, sinon } from '../../../spec_helper' import path from 'path' import type { CyPromptServerShape } from '@packages/types' import { expect } from 'chai' import esbuild from 'esbuild' import type { CyPromptManager as CyPromptManagerShape } from '@packages/server/lib/cloud/cy-prompt/CyPromptManager' impo...
typescript
MIT
409444f8ea51d8f14dec8d10510f78c4a5f42271
2026-01-04T15:36:58.228650Z
false
cypress-io/cypress
https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/packages/server/test/unit/cloud/network/fetch_spec.ts
packages/server/test/unit/cloud/network/fetch_spec.ts
import sinon from 'sinon' import { expect } from 'chai' import { Response } from 'cross-fetch' import proxyquire from 'proxyquire' import type { fetch, putFetch, postFetch } from '../../../../lib/cloud/network/fetch' import { ParseError } from '../../../../lib/cloud/network/parse_error' import { HttpError } from '../.....
typescript
MIT
409444f8ea51d8f14dec8d10510f78c4a5f42271
2026-01-04T15:36:58.228650Z
false
cypress-io/cypress
https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/packages/server/test/unit/cloud/network/is_retryable_error_spec.ts
packages/server/test/unit/cloud/network/is_retryable_error_spec.ts
import { isRetryableError } from '../../../../lib/cloud/network/is_retryable_error' import { SystemError } from '../../../../lib/cloud/network/system_error' import { HttpError } from '../../../../lib/cloud/network/http_error' import sinon from 'sinon' import chai, { expect } from 'chai' import sinonChai from 'sinon-ch...
typescript
MIT
409444f8ea51d8f14dec8d10510f78c4a5f42271
2026-01-04T15:36:58.228650Z
false
cypress-io/cypress
https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/packages/server/test/unit/automation/util_spec.ts
packages/server/test/unit/automation/util_spec.ts
const { expect } = require('../../spec_helper') import { cookieMatches, CyCookie } from '../../../lib/automation/util' context('lib/automation/util', () => { context('.cookieMatches', () => { it('matches same apex domain', () => { const cookie = { domain: 'example.com' } as CyCookie const filter = {...
typescript
MIT
409444f8ea51d8f14dec8d10510f78c4a5f42271
2026-01-04T15:36:58.228650Z
false
cypress-io/cypress
https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/packages/server/test/unit/automation/commands/key_press.spec.ts
packages/server/test/unit/automation/commands/key_press.spec.ts
import type Sinon from 'sinon' import type { expect as Expect } from 'chai' import { SupportedKey, NamedKeys, toSupportedKey, SpaceKey } from '@packages/types' import type { SendDebuggerCommand } from '../../../../lib/browsers/cdp_automation' import { cdpKeyPress, bidiKeyPress, BidiOverrideCodepoints } from '../../../....
typescript
MIT
409444f8ea51d8f14dec8d10510f78c4a5f42271
2026-01-04T15:36:58.228650Z
false
cypress-io/cypress
https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/packages/server/test/unit/gui/links_spec.ts
packages/server/test/unit/gui/links_spec.ts
import '../../spec_helper' import { expect } from 'chai' import 'sinon-chai' import { shell } from 'electron' import { openExternal } from '../../../lib/gui/links' describe('lib/gui/links', () => { beforeEach(() => { shell.openExternal = sinon.stub() }) afterEach(() => { sinon.restore() }) it('o...
typescript
MIT
409444f8ea51d8f14dec8d10510f78c4a5f42271
2026-01-04T15:36:58.228650Z
false
cypress-io/cypress
https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/packages/server/test/unit/gui/windows_spec.ts
packages/server/test/unit/gui/windows_spec.ts
import '../../spec_helper' import { expect } from 'chai' import 'sinon-chai' import _ from 'lodash' import Promise from 'bluebird' import { EventEmitter } from 'events' import { BrowserWindow } from 'electron' import * as Windows from '../../../lib/gui/windows' import * as savedState from '../../../lib/saved_state' ...
typescript
MIT
409444f8ea51d8f14dec8d10510f78c4a5f42271
2026-01-04T15:36:58.228650Z
false
cypress-io/cypress
https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/packages/server/lib/config.ts
packages/server/lib/config.ts
import _ from 'lodash' import * as configUtils from '@packages/config' export const setUrls = configUtils.setUrls // Strips out values that can be aribitrarily sized / are duplicated from config // payload sent for recording export function filterRuntimeConfigForRecording (config) { const { rawJson, devServer, env,...
typescript
MIT
409444f8ea51d8f14dec8d10510f78c4a5f42271
2026-01-04T15:36:58.228650Z
false
cypress-io/cypress
https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/packages/server/lib/project-base.ts
packages/server/lib/project-base.ts
import Debug from 'debug' import EE from 'events' import _ from 'lodash' import path from 'path' import pkg from '@packages/root' import { Automation } from './automation' import browsers from './browsers' import * as config from './config' import * as errors from './errors' import preprocessor from './plugins/preproc...
typescript
MIT
409444f8ea51d8f14dec8d10510f78c4a5f42271
2026-01-04T15:36:58.228650Z
false
cypress-io/cypress
https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/packages/server/lib/cwd.ts
packages/server/lib/cwd.ts
import path from 'path' export const getCwd = (...args: string[]) => { return path.join(__dirname, '..', ...args) }
typescript
MIT
409444f8ea51d8f14dec8d10510f78c4a5f42271
2026-01-04T15:36:58.228650Z
false
cypress-io/cypress
https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/packages/server/lib/cypress.ts
packages/server/lib/cypress.ts
// we are not requiring everything up front // to optimize how quickly electron boots while // in dev or linux production. the reasoning is // that we likely may need to spawn a new child process // and its a huge waste of time (about 1.5secs) of // synchronous requires the first go around just to // essentially do it ...
typescript
MIT
409444f8ea51d8f14dec8d10510f78c4a5f42271
2026-01-04T15:36:58.228650Z
false
cypress-io/cypress
https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/packages/server/lib/video_capture.ts
packages/server/lib/video_capture.ts
import _ from 'lodash' import utils from 'fluent-ffmpeg/lib/utils' import Debug from 'debug' import ffmpeg from 'fluent-ffmpeg' import stream from 'stream' import Bluebird from 'bluebird' import { path as ffmpegPath } from '@ffmpeg-installer/ffmpeg' import { path as ffprobePath } from '@ffprobe-installer/ffprobe' impor...
typescript
MIT
409444f8ea51d8f14dec8d10510f78c4a5f42271
2026-01-04T15:36:58.228650Z
false
cypress-io/cypress
https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/packages/server/lib/unhandled_exceptions.ts
packages/server/lib/unhandled_exceptions.ts
import Debug from 'debug' const debug = Debug('cypress:server:unhandled_exceptions') export function handle (shouldExitCb?: (err: Error) => boolean) { function globalExceptionHandler (err: Error) { if (shouldExitCb && !shouldExitCb(err)) { debug('suppressing unhandled exception, not exiting %o', { err }) ...
typescript
MIT
409444f8ea51d8f14dec8d10510f78c4a5f42271
2026-01-04T15:36:58.228650Z
false
cypress-io/cypress
https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/packages/server/lib/runner-ct.ts
packages/server/lib/runner-ct.ts
import Debug from 'debug' import _ from 'lodash' import send from 'send' import { getPathToIndex, getPathToDist } from '@packages/resolve-dist' import type { Cfg } from './project-base' import type { Browser } from './browsers/types' interface ServeOptions { config: Cfg getCurrentBrowser: () => Browser } const de...
typescript
MIT
409444f8ea51d8f14dec8d10510f78c4a5f42271
2026-01-04T15:36:58.228650Z
false
cypress-io/cypress
https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/packages/server/lib/append_electron_switches.ts
packages/server/lib/append_electron_switches.ts
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 { // w...
typescript
MIT
409444f8ea51d8f14dec8d10510f78c4a5f42271
2026-01-04T15:36:58.228650Z
false
cypress-io/cypress
https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/packages/server/lib/errors.ts
packages/server/lib/errors.ts
import Bluebird from 'bluebird' import errors from '@packages/errors' import exception from './cloud/exception' const isProduction = () => { return process.env['CYPRESS_INTERNAL_ENV'] === 'production' } export const logException = Bluebird.method(function (this: any, err) { // TODO: remove context here if (this...
typescript
MIT
409444f8ea51d8f14dec8d10510f78c4a5f42271
2026-01-04T15:36:58.228650Z
false
cypress-io/cypress
https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/packages/server/lib/files.ts
packages/server/lib/files.ts
import path from 'path' import { fs } from './util/fs' export async function readFile (projectRoot: string, options: { file: string, encoding?: BufferEncoding } = { file: '', encoding: 'utf8' }) { const filePath = path.resolve(projectRoot, options.file) // https://github.com/cypress-io/cypress/issues/1558 // If...
typescript
MIT
409444f8ea51d8f14dec8d10510f78c4a5f42271
2026-01-04T15:36:58.228650Z
false
cypress-io/cypress
https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/packages/server/lib/session.ts
packages/server/lib/session.ts
import type { StoredSessions } from '@packages/types' type State = { globalSessions: StoredSessions specSessions: StoredSessions } const state: State = { globalSessions: {}, specSessions: {}, } export function saveSession (data: Cypress.ServerSessionData): void { if (!data.id) throw new Error('session data...
typescript
MIT
409444f8ea51d8f14dec8d10510f78c4a5f42271
2026-01-04T15:36:58.228650Z
false
cypress-io/cypress
https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/packages/server/lib/makeDataContext.ts
packages/server/lib/makeDataContext.ts
import { DataContext, getCtx, clearCtx, setCtx } from '@packages/data-context' // tslint:disable-next-line no-implicit-dependencies - electron dep needs to be defined import electron, { OpenDialogOptions, SaveDialogOptions, BrowserWindow } from 'electron' import { isListening } from './util/ensure-url' import { isMain...
typescript
MIT
409444f8ea51d8f14dec8d10510f78c4a5f42271
2026-01-04T15:36:58.228650Z
false
cypress-io/cypress
https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/packages/server/lib/studio.ts
packages/server/lib/studio.ts
import * as savedState from './saved_state' import { Command, SaveDetails, createNewTestInFile, appendCommandsToTest, createNewTestInSuite, convertCommandsToText } from './util/spec_writer' interface SaveInfo extends SaveDetails { isSuite: boolean isRoot: boolean } class StudioSaveError extends Error { static e...
typescript
MIT
409444f8ea51d8f14dec8d10510f78c4a5f42271
2026-01-04T15:36:58.228650Z
false
cypress-io/cypress
https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/packages/server/lib/file_server.ts
packages/server/lib/file_server.ts
// TODO: move this to packages/core-file-server import _ from 'lodash' import debugModule from 'debug' import url from 'url' import http from 'http' import path from 'path' import send from 'send' import { httpUtils } from '@packages/network' import { allowDestroy } from './util/server_destroy' import { id as randomId ...
typescript
MIT
409444f8ea51d8f14dec8d10510f78c4a5f42271
2026-01-04T15:36:58.228650Z
false