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/driver/cypress/e2e/e2e/origin/origin.cy.ts | packages/driver/cypress/e2e/e2e/origin/origin.cy.ts | describe('cy.origin', { browser: '!webkit' }, () => {
it('successfully visits after creating 30 spec bridges', () => {
// Make ~30 spec bridges
for (let index = 0; index < 30; index++) {
cy.origin(`http://www.${index}.com:3500`, () => undefined)
}
cy.origin('http://www.app.foobar.com:3500', () ... | typescript | MIT | 409444f8ea51d8f14dec8d10510f78c4a5f42271 | 2026-01-04T15:36:58.228650Z | false |
cypress-io/cypress | https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/packages/driver/cypress/e2e/e2e/origin/cookie_login.cy.ts | packages/driver/cypress/e2e/e2e/origin/cookie_login.cy.ts | import dayjs from 'dayjs'
describe('cy.origin - cookie login', { browser: '!webkit' }, () => {
const { _ } = Cypress
// ensures unique username so there's no risk of false positives from
// test pollution
const getUsername = () => _.uniqueId('user')
const verifyLoggedIn = (username, { cookieKey } = { cookie... | typescript | MIT | 409444f8ea51d8f14dec8d10510f78c4a5f42271 | 2026-01-04T15:36:58.228650Z | false |
cypress-io/cypress | https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/packages/driver/cypress/e2e/e2e/origin/cypress_api.cy.ts | packages/driver/cypress/e2e/e2e/origin/cypress_api.cy.ts | const { assertLogLength } = require('../../../support/utils')
describe('cy.origin Cypress API', { browser: '!webkit' }, () => {
beforeEach(() => {
cy.visit('/fixtures/primary-origin.html')
cy.get('a[data-cy="cross-origin-secondary-link"]').click()
})
context('Commands', () => {
it('adds a custom com... | typescript | MIT | 409444f8ea51d8f14dec8d10510f78c4a5f42271 | 2026-01-04T15:36:58.228650Z | false |
cypress-io/cypress | https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/packages/driver/cypress/e2e/e2e/origin/patches.cy.ts | packages/driver/cypress/e2e/e2e/origin/patches.cy.ts | // Stubbing increases the time taken to make a backend request call, so we increase the default command timeout to avoid flake.
describe('src/cross-origin/patches', { browser: '!webkit', defaultCommandTimeout: 10000 }, () => {
context('submit', () => {
beforeEach(() => {
cy.visit('/fixtures/primary-origin.h... | typescript | MIT | 409444f8ea51d8f14dec8d10510f78c4a5f42271 | 2026-01-04T15:36:58.228650Z | false |
cypress-io/cypress | https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/packages/driver/cypress/e2e/e2e/origin/integrity.cy.ts | packages/driver/cypress/e2e/e2e/origin/integrity.cy.ts | import CryptoJS from 'crypto-js'
import type { TemplateExecutor } from 'lodash'
// NOTE: in order to run these tests, the following config flags need to be set
// experimentalModifyObstructiveThirdPartyCode=true
describe('Integrity Preservation', { browser: '!webkit' }, () => {
// Add common SRI hashes used when ... | typescript | MIT | 409444f8ea51d8f14dec8d10510f78c4a5f42271 | 2026-01-04T15:36:58.228650Z | false |
cypress-io/cypress | https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/packages/driver/cypress/e2e/e2e/origin/commands/waiting.cy.ts | packages/driver/cypress/e2e/e2e/origin/commands/waiting.cy.ts | import { findCrossOriginLogs } from '../../../../support/utils'
declare global {
interface Window {
xhrGet: any
}
}
const xhrGet = (url) => {
const xhr = new window.XMLHttpRequest()
xhr.open('GET', url)
xhr.send()
}
context('cy.origin waiting', { browser: '!webkit' }, () => {
before(() => {
cy.o... | typescript | MIT | 409444f8ea51d8f14dec8d10510f78c4a5f42271 | 2026-01-04T15:36:58.228650Z | false |
cypress-io/cypress | https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/packages/driver/cypress/e2e/e2e/origin/commands/log.cy.ts | packages/driver/cypress/e2e/e2e/origin/commands/log.cy.ts | import { assertLogLength } from '../../../../support/utils'
context('cy.origin log', { browser: '!webkit' }, () => {
let logs: any = []
let lastTestLogId = ''
beforeEach(() => {
logs = []
cy.on('log:added', (attrs, log) => {
logs.push(log)
})
cy.visit('/fixtures/primary-origin.html')
... | typescript | MIT | 409444f8ea51d8f14dec8d10510f78c4a5f42271 | 2026-01-04T15:36:58.228650Z | false |
cypress-io/cypress | https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/packages/driver/cypress/e2e/e2e/origin/commands/files.cy.ts | packages/driver/cypress/e2e/e2e/origin/commands/files.cy.ts | import { findCrossOriginLogs } from '../../../../support/utils'
context('cy.origin files', { browser: '!webkit' }, () => {
beforeEach(() => {
cy.visit('/fixtures/primary-origin.html')
cy.get('a[data-cy="cross-origin-secondary-link"]').click()
})
it('.fixture()', () => {
cy.origin('http://www.foobar.... | typescript | MIT | 409444f8ea51d8f14dec8d10510f78c4a5f42271 | 2026-01-04T15:36:58.228650Z | false |
cypress-io/cypress | https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/packages/driver/cypress/e2e/e2e/origin/commands/location.cy.ts | packages/driver/cypress/e2e/e2e/origin/commands/location.cy.ts | import { findCrossOriginLogs } from '../../../../support/utils'
context('cy.origin location', { browser: '!webkit' }, () => {
beforeEach(() => {
cy.visit('/fixtures/primary-origin.html')
cy.get('a[data-cy="cross-origin-secondary-link"]').click()
})
it('.hash()', () => {
cy.origin('http://www.foobar.... | typescript | MIT | 409444f8ea51d8f14dec8d10510f78c4a5f42271 | 2026-01-04T15:36:58.228650Z | false |
cypress-io/cypress | https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/packages/driver/cypress/e2e/e2e/origin/commands/querying_shadow.cy.ts | packages/driver/cypress/e2e/e2e/origin/commands/querying_shadow.cy.ts | import { findCrossOriginLogs } from '../../../../support/utils'
context('cy.origin shadow dom', { browser: '!webkit' }, () => {
beforeEach(() => {
cy.visit('/fixtures/primary-origin.html')
cy.get('a[data-cy="shadow-dom-link"]').click()
})
it('.shadow()', () => {
cy.origin('http://www.foobar.com:3500... | typescript | MIT | 409444f8ea51d8f14dec8d10510f78c4a5f42271 | 2026-01-04T15:36:58.228650Z | false |
cypress-io/cypress | https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/packages/driver/cypress/e2e/e2e/origin/commands/aliasing.cy.ts | packages/driver/cypress/e2e/e2e/origin/commands/aliasing.cy.ts | import { findCrossOriginLogs } from '../../../../support/utils'
context('cy.origin aliasing', { browser: '!webkit' }, () => {
beforeEach(() => {
cy.visit('/fixtures/primary-origin.html')
})
context('.as()', () => {
it('supports dom elements inside origin', () => {
cy.get('a[data-cy="dom-link"]').c... | typescript | MIT | 409444f8ea51d8f14dec8d10510f78c4a5f42271 | 2026-01-04T15:36:58.228650Z | false |
cypress-io/cypress | https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/packages/driver/cypress/e2e/e2e/origin/commands/actions.cy.ts | packages/driver/cypress/e2e/e2e/origin/commands/actions.cy.ts | import { findCrossOriginLogs } from '../../../../support/utils'
context('cy.origin actions', { browser: '!webkit' }, () => {
beforeEach(() => {
cy.visit('/fixtures/primary-origin.html')
})
it('.type()', () => {
cy.get('a[data-cy="dom-link"]').click()
cy.origin('http://www.foobar.com:3500', () => {
... | typescript | MIT | 409444f8ea51d8f14dec8d10510f78c4a5f42271 | 2026-01-04T15:36:58.228650Z | true |
cypress-io/cypress | https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/packages/driver/cypress/e2e/e2e/origin/commands/navigation.cy.ts | packages/driver/cypress/e2e/e2e/origin/commands/navigation.cy.ts | import { authCreds } from '../../../../fixtures/auth_creds'
import { findCrossOriginLogs } from '../../../../support/utils'
context('cy.origin navigation', { browser: '!webkit' }, () => {
it('.go()', () => {
cy.visit('/fixtures/primary-origin.html')
cy.get('a[data-cy="cross-origin-secondary-link"]').click()
... | typescript | MIT | 409444f8ea51d8f14dec8d10510f78c4a5f42271 | 2026-01-04T15:36:58.228650Z | false |
cypress-io/cypress | https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/packages/driver/cypress/e2e/e2e/origin/commands/screenshot.cy.ts | packages/driver/cypress/e2e/e2e/origin/commands/screenshot.cy.ts | context('cy.origin screenshot', { browser: '!webkit' }, () => {
const { devicePixelRatio } = window
context('set viewport', () => {
beforeEach(function () {
this.serverResult = {
path: '/path/to/screenshot',
size: 12,
dimensions: { width: 20, height: 20 },
multipart: false... | typescript | MIT | 409444f8ea51d8f14dec8d10510f78c4a5f42271 | 2026-01-04T15:36:58.228650Z | false |
cypress-io/cypress | https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/packages/driver/cypress/e2e/e2e/origin/commands/traversal.cy.ts | packages/driver/cypress/e2e/e2e/origin/commands/traversal.cy.ts | import { findCrossOriginLogs } from '../../../../support/utils'
context('cy.origin traversal', { browser: '!webkit' }, () => {
beforeEach(() => {
cy.visit('/fixtures/primary-origin.html')
cy.get('a[data-cy="dom-link"]').click()
})
it('.children()', () => {
cy.origin('http://www.foobar.com:3500', () ... | typescript | MIT | 409444f8ea51d8f14dec8d10510f78c4a5f42271 | 2026-01-04T15:36:58.228650Z | false |
cypress-io/cypress | https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/packages/driver/cypress/e2e/e2e/origin/commands/window.cy.ts | packages/driver/cypress/e2e/e2e/origin/commands/window.cy.ts | import { findCrossOriginLogs } from '../../../../support/utils'
context('cy.origin window', { browser: '!webkit' }, () => {
beforeEach(() => {
cy.visit('/fixtures/primary-origin.html')
cy.get('a[data-cy="dom-link"]').click()
})
it('.window()', () => {
cy.origin('http://www.foobar.com:3500', () => {
... | typescript | MIT | 409444f8ea51d8f14dec8d10510f78c4a5f42271 | 2026-01-04T15:36:58.228650Z | false |
cypress-io/cypress | https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/packages/driver/cypress/e2e/e2e/origin/commands/querying.cy.ts | packages/driver/cypress/e2e/e2e/origin/commands/querying.cy.ts | import { findCrossOriginLogs } from '../../../../support/utils'
context('cy.origin querying', { browser: '!webkit' }, () => {
beforeEach(() => {
cy.visit('/fixtures/primary-origin.html')
cy.get('a[data-cy="dom-link"]').click()
})
it('.get()', () => {
cy.origin('http://www.foobar.com:3500', () => {
... | typescript | MIT | 409444f8ea51d8f14dec8d10510f78c4a5f42271 | 2026-01-04T15:36:58.228650Z | false |
cypress-io/cypress | https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/packages/driver/cypress/e2e/e2e/origin/commands/spies_stubs_clocks.cy.ts | packages/driver/cypress/e2e/e2e/origin/commands/spies_stubs_clocks.cy.ts | import { findCrossOriginLogs } from '../../../../support/utils'
context('cy.origin spies, stubs, and clock', { browser: '!webkit' }, () => {
beforeEach(() => {
cy.visit('/fixtures/primary-origin.html')
cy.get('a[data-cy="cross-origin-secondary-link"]').click()
})
it('spy()', () => {
cy.origin('http:... | typescript | MIT | 409444f8ea51d8f14dec8d10510f78c4a5f42271 | 2026-01-04T15:36:58.228650Z | false |
cypress-io/cypress | https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/packages/driver/cypress/e2e/e2e/origin/commands/connectors.cy.ts | packages/driver/cypress/e2e/e2e/origin/commands/connectors.cy.ts | import { findCrossOriginLogs } from '../../../../support/utils'
context('cy.origin connectors', { browser: '!webkit' }, () => {
beforeEach(() => {
cy.visit('/fixtures/primary-origin.html')
cy.get('a[data-cy="dom-link"]').click()
})
it('.each()', () => {
cy.origin('http://www.foobar.com:3500', () => ... | typescript | MIT | 409444f8ea51d8f14dec8d10510f78c4a5f42271 | 2026-01-04T15:36:58.228650Z | false |
cypress-io/cypress | https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/packages/driver/cypress/e2e/e2e/origin/commands/assertions.cy.ts | packages/driver/cypress/e2e/e2e/origin/commands/assertions.cy.ts | import { findCrossOriginLogs } from '../../../../support/utils'
context('cy.origin assertions', { browser: '!webkit' }, () => {
beforeEach(() => {
cy.visit('/fixtures/primary-origin.html')
cy.get('a[data-cy="dom-link"]').click()
})
it('.should() and .and()', () => {
cy.origin('http://www.foobar.com:... | typescript | MIT | 409444f8ea51d8f14dec8d10510f78c4a5f42271 | 2026-01-04T15:36:58.228650Z | false |
cypress-io/cypress | https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/packages/driver/cypress/e2e/e2e/origin/commands/cookies.cy.ts | packages/driver/cypress/e2e/e2e/origin/commands/cookies.cy.ts | import { findCrossOriginLogs, assertLogLength } from '../../../../support/utils'
describe('cy.origin cookies', { browser: '!webkit' }, () => {
context('client side', () => {
beforeEach(() => {
cy.visit('/fixtures/primary-origin.html')
cy.get('a[data-cy="cross-origin-secondary-link"]').click()
})
... | typescript | MIT | 409444f8ea51d8f14dec8d10510f78c4a5f42271 | 2026-01-04T15:36:58.228650Z | false |
cypress-io/cypress | https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/packages/driver/cypress/e2e/e2e/origin/commands/misc.cy.ts | packages/driver/cypress/e2e/e2e/origin/commands/misc.cy.ts | import { findCrossOriginLogs } from '../../../../support/utils'
context('cy.origin misc', { browser: '!webkit' }, () => {
beforeEach(() => {
cy.visit('/fixtures/primary-origin.html')
cy.get('a[data-cy="dom-link"]').click()
})
it('.end()', () => {
cy.origin('http://www.foobar.com:3500', () => {
... | typescript | MIT | 409444f8ea51d8f14dec8d10510f78c4a5f42271 | 2026-01-04T15:36:58.228650Z | false |
cypress-io/cypress | https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/packages/driver/cypress/e2e/e2e/origin/commands/viewport.cy.ts | packages/driver/cypress/e2e/e2e/origin/commands/viewport.cy.ts | import { findCrossOriginLogs } from '../../../../support/utils'
context('cy.origin viewport', { browser: '!webkit' }, () => {
it('syncs the viewport from the primary to secondary', () => {
// change the viewport in the primary first
cy.viewport(320, 480)
cy.visit('/fixtures/primary-origin.html')
cy.... | typescript | MIT | 409444f8ea51d8f14dec8d10510f78c4a5f42271 | 2026-01-04T15:36:58.228650Z | false |
cypress-io/cypress | https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/packages/driver/cypress/e2e/e2e/origin/commands/network_requests.cy.ts | packages/driver/cypress/e2e/e2e/origin/commands/network_requests.cy.ts | import { findCrossOriginLogs } from '../../../../support/utils'
context('cy.origin network requests', { browser: '!webkit' }, () => {
beforeEach(() => {
cy.visit('/fixtures/primary-origin.html')
cy.get('a[data-cy="request-link"]').click()
})
it('.request() to secondary origin', () => {
cy.origin('ht... | typescript | MIT | 409444f8ea51d8f14dec8d10510f78c4a5f42271 | 2026-01-04T15:36:58.228650Z | false |
cypress-io/cypress | https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/packages/driver/cypress/e2e/e2e/origin/commands/storage.cy.ts | packages/driver/cypress/e2e/e2e/origin/commands/storage.cy.ts | import { findCrossOriginLogs } from '../../../../support/utils'
context('cy.origin storage', { browser: '!webkit' }, () => {
beforeEach(() => {
cy.visit('/fixtures/primary-origin.html')
cy.get('a[data-cy="cross-origin-secondary-link"]').click()
})
it('.getAllLocalStorage', () => {
cy.origin('http://... | typescript | MIT | 409444f8ea51d8f14dec8d10510f78c4a5f42271 | 2026-01-04T15:36:58.228650Z | false |
cypress-io/cypress | https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/packages/driver/cypress/e2e/e2e/origin/commands/unsupported_commands.cy.ts | packages/driver/cypress/e2e/e2e/origin/commands/unsupported_commands.cy.ts | context('cy.origin unsupported commands', { browser: '!webkit' }, () => {
beforeEach(() => {
cy.visit('/fixtures/primary-origin.html')
cy.get('a[data-cy="cross-origin-secondary-link"]').click()
})
it('cy.origin() is not yet supported', (done) => {
cy.on('fail', (err) => {
expect(err.message).to... | typescript | MIT | 409444f8ea51d8f14dec8d10510f78c4a5f42271 | 2026-01-04T15:36:58.228650Z | false |
cypress-io/cypress | https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/packages/driver/cypress/e2e/cypress/events.cy.ts | packages/driver/cypress/e2e/cypress/events.cy.ts | describe('src/cypress', () => {
describe('events', () => {
it('fail event', (done) => {
cy.on('fail', (err, runnable) => {
expect(err.message).to.equal('foo')
expect(runnable).to.equal(Cypress.state('runnable'))
done()
})
throw new Error('foo')
})
it('viewport:... | typescript | MIT | 409444f8ea51d8f14dec8d10510f78c4a5f42271 | 2026-01-04T15:36:58.228650Z | false |
cypress-io/cypress | https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/packages/driver/cypress/e2e/cypress/resolvers.cy.ts | packages/driver/cypress/e2e/cypress/resolvers.cy.ts | const getFakeWindowWithLocation = ($win: Window) => {
return {
document: $win.document,
location: {
someFn: cy.stub(),
someProp: 'foo',
href: 'original',
assign: cy.stub(),
replace: cy.stub(),
},
}
}
describe('src/cypress/resolvers', function () {
context('#resolveWindow... | typescript | MIT | 409444f8ea51d8f14dec8d10510f78c4a5f42271 | 2026-01-04T15:36:58.228650Z | false |
cypress-io/cypress | https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/packages/driver/cypress/e2e/cypress/downloads.cy.ts | packages/driver/cypress/e2e/cypress/downloads.cy.ts | import $Downloads from '../../../src/cypress/downloads'
import { authCreds } from '../../fixtures/auth_creds'
describe('src/cypress/downloads', () => {
let log
let snapshot
let end
let error
let downloads
let downloadItem = {
id: '1',
filePath: '/path/to/save/location.csv',
url: 'http://localho... | typescript | MIT | 409444f8ea51d8f14dec8d10510f78c4a5f42271 | 2026-01-04T15:36:58.228650Z | false |
cypress-io/cypress | https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/packages/driver/cypress/e2e/cypress/element_selector.cy.ts | packages/driver/cypress/e2e/cypress/element_selector.cy.ts | /// <reference types="cypress" />
import type { ElementSelectorAPI } from '../../../src/cypress/element_selector'
import { DEFAULT_SELECTOR_PRIORITIES } from '../../../src/cypress/element_selector'
const { $: $cypress } = Cypress.$Cypress
const ElementSelector = Cypress.ElementSelector as ElementSelectorAPI & {
_rese... | typescript | MIT | 409444f8ea51d8f14dec8d10510f78c4a5f42271 | 2026-01-04T15:36:58.228650Z | false |
cypress-io/cypress | https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/packages/driver/cypress/e2e/cypress/proxy-logging.cy.ts | packages/driver/cypress/e2e/cypress/proxy-logging.cy.ts | import { expect } from 'chai'
describe('Proxy Logging', () => {
const { _ } = Cypress
const url = '/testFlag'
const alias = 'aliasName'
function testFlag (expectStatus, expectInterceptions, setupFn, getFn) {
return () => {
setupFn()
let resolve
const p = new Promise((_resolve) => resol... | typescript | MIT | 409444f8ea51d8f14dec8d10510f78c4a5f42271 | 2026-01-04T15:36:58.228650Z | false |
cypress-io/cypress | https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/packages/driver/cypress/e2e/cypress/command_queue.cy.ts | packages/driver/cypress/e2e/cypress/command_queue.cy.ts | import _ from 'lodash'
import type { IStability } from '../../../src/cy/stability'
import $Command from '../../../src/cypress/command'
import { CommandQueue } from '../../../src/cypress/command_queue'
import type { StateFunc } from '../../../src/cypress/state'
const createCommand = (props = {}) => {
return $Command.... | typescript | MIT | 409444f8ea51d8f14dec8d10510f78c4a5f42271 | 2026-01-04T15:36:58.228650Z | false |
cypress-io/cypress | https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/packages/driver/cypress/e2e/cypress/shadow_dom_utils.cy.ts | packages/driver/cypress/e2e/cypress/shadow_dom_utils.cy.ts | import { resolveShadowDomInclusion } from '../../../src/cypress/shadow_dom_utils'
describe('src/cypress/shadow_dom_utils', () => {
context('.resolveShadowDomInclusion', () => {
let CypressMock
beforeEach(() => {
CypressMock = {
config: cy.stub(),
}
})
it('returns true if command... | typescript | MIT | 409444f8ea51d8f14dec8d10510f78c4a5f42271 | 2026-01-04T15:36:58.228650Z | false |
cypress-io/cypress | https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/packages/driver/cypress/e2e/cypress/error_utils.cy.ts | packages/driver/cypress/e2e/cypress/error_utils.cy.ts | import { allowTsModuleStubbing } from '../../support/helpers'
allowTsModuleStubbing()
import $stackUtils from '../../../src/cypress/stack_utils'
import $errUtils, { CypressError } from '../../../src/cypress/error_utils'
import $errorMessages from '../../../src/cypress/error_messages'
const { sinon } = Cypress
descr... | typescript | MIT | 409444f8ea51d8f14dec8d10510f78c4a5f42271 | 2026-01-04T15:36:58.228650Z | false |
cypress-io/cypress | https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/packages/driver/cypress/e2e/cypress/stack_utils-invocationDetails.cy.ts | packages/driver/cypress/e2e/cypress/stack_utils-invocationDetails.cy.ts | import type { InvocationDetails } from '../../../src/cypress/stack_utils'
// Create a custom it function that will add additional stack frames that need to be trimmed correctly
function myIt (name: string, optionsOrFn: any, fn?: () => void) {
if (fn) {
it(name, optionsOrFn, fn)
} else {
it(name, optionsOrF... | typescript | MIT | 409444f8ea51d8f14dec8d10510f78c4a5f42271 | 2026-01-04T15:36:58.228650Z | false |
cypress-io/cypress | https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/packages/driver/cypress/e2e/dom/visibility_shadow_dom.cy.ts | packages/driver/cypress/e2e/dom/visibility_shadow_dom.cy.ts | export {} // make typescript see this as a module
const { $ } = Cypress
describe('src/cypress/dom/visibility - shadow dom', () => {
let add: (el: string, shadowEl: string, rootIdentifier: string) => JQuery<HTMLElement>
// #TODO: support shadow dom in fast visibility algorithm: https://github.com/cypress-io/cypre... | typescript | MIT | 409444f8ea51d8f14dec8d10510f78c4a5f42271 | 2026-01-04T15:36:58.228650Z | true |
cypress-io/cypress | https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/packages/driver/cypress/e2e/dom/elements.cy.ts | packages/driver/cypress/e2e/dom/elements.cy.ts | import $elements from '../../../src/dom/elements'
const { getActiveElByDocument, isFocused, elementFromPoint, isFocusedOrInFocused } = $elements
const $ = window.Cypress.$
describe('src/dom/elements', () => {
context('.isAttached', () => {
beforeEach(() => {
cy.visit('/fixtures/iframe-outer.html')
})
... | typescript | MIT | 409444f8ea51d8f14dec8d10510f78c4a5f42271 | 2026-01-04T15:36:58.228650Z | false |
cypress-io/cypress | https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/packages/driver/cypress/e2e/dom/coordinates.cy.ts | packages/driver/cypress/e2e/dom/coordinates.cy.ts | import $coordinates from '../../../src/dom/coordinates'
import $elements from '../../../src/dom/elements'
const { $ } = Cypress
export {}
describe('src/dom/coordinates', () => {
beforeEach(function () {
cy.visit('/fixtures/generic.html').then(() => {
this.$button = $('<button style=\'position: absolute; ... | typescript | MIT | 409444f8ea51d8f14dec8d10510f78c4a5f42271 | 2026-01-04T15:36:58.228650Z | false |
cypress-io/cypress | https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/packages/driver/cypress/e2e/dom/visibility.cy.ts | packages/driver/cypress/e2e/dom/visibility.cy.ts | // @ts-ignore
const { $, dom } = Cypress
describe('src/cypress/dom/visibility', {
slowTestThreshold: 500,
}, () => {
function assertVisibilityForEl (el: HTMLElement) {
// once experimentalFastVisibility is added, switch based on the config value
// and use `cy-fast-expect` instead of `cy-legacy-expect` whe... | typescript | MIT | 409444f8ea51d8f14dec8d10510f78c4a5f42271 | 2026-01-04T15:36:58.228650Z | false |
cypress-io/cypress | https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/packages/driver/cypress/e2e/dom/jquery.cy.ts | packages/driver/cypress/e2e/dom/jquery.cy.ts | /// <reference path="./jquery.d.ts" />
describe('src/dom/jquery', () => {
context('.isJquery', () => {
it('does not get confused when window contains jquery function', () => {
window.jquery = () => {}
expect(Cypress.dom.isJquery(window)).to.be.false
})
it('is true for actual jquery instance... | typescript | MIT | 409444f8ea51d8f14dec8d10510f78c4a5f42271 | 2026-01-04T15:36:58.228650Z | false |
cypress-io/cypress | https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/packages/driver/cypress/e2e/dom/jquery.d.ts | packages/driver/cypress/e2e/dom/jquery.d.ts | declare global {
interface Window {
jquery: () => void | undefined | null
}
}
export {}
| typescript | MIT | 409444f8ea51d8f14dec8d10510f78c4a5f42271 | 2026-01-04T15:36:58.228650Z | false |
cypress-io/cypress | https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/packages/driver/cypress/e2e/cy/net-stubbing/static-response-utils.cy.ts | packages/driver/cypress/e2e/cy/net-stubbing/static-response-utils.cy.ts | const {
getBackendStaticResponse,
} = require('../../../../src/cy/net-stubbing/static-response-utils')
describe('driver/src/cy/net-stubbing/static-response-utils', () => {
describe('.getBackendStaticResponse', () => {
describe('delay', () => {
it('does not set delay when delay is not provided', () => {
... | typescript | MIT | 409444f8ea51d8f14dec8d10510f78c4a5f42271 | 2026-01-04T15:36:58.228650Z | false |
cypress-io/cypress | https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/packages/driver/cypress/component/spec.cy.ts | packages/driver/cypress/component/spec.cy.ts | const { sinon } = Cypress
describe('component testing', () => {
let uncaughtExceptionStub
before(() => {
uncaughtExceptionStub = cy.stub()
Cypress.on('uncaught:exception', (err) => {
uncaughtExceptionStub(null)
return false
})
})
beforeEach(() => {
uncaughtExceptionStub.resetHis... | typescript | MIT | 409444f8ea51d8f14dec8d10510f78c4a5f42271 | 2026-01-04T15:36:58.228650Z | false |
cypress-io/cypress | https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/packages/driver/cypress/component/stack_utils-invocationDetails.cy.ts | packages/driver/cypress/component/stack_utils-invocationDetails.cy.ts | describe('component testing stack utils', () => {
beforeEach(() => {
const root = document.querySelector('[data-cy-root]')
if (root) {
root.innerHTML = 'component test'
}
})
// Test case for when users re-define Mocha's it function
// This creates additional stack frames that need to be trim... | typescript | MIT | 409444f8ea51d8f14dec8d10510f78c4a5f42271 | 2026-01-04T15:36:58.228650Z | false |
cypress-io/cypress | https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/packages/driver/types/remote-state.d.ts | packages/driver/types/remote-state.d.ts | declare namespace Cypress {
interface RemoteState {
auth?: Auth
domainName: string
strategy: 'file' | 'http'
origin: string
fileServer: string | null
props: Record<string, any>
}
interface RuntimeConfigOptions {
remote: RemoteState
}
}
| typescript | MIT | 409444f8ea51d8f14dec8d10510f78c4a5f42271 | 2026-01-04T15:36:58.228650Z | false |
cypress-io/cypress | https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/packages/driver/types/internal-types-lite.d.ts | packages/driver/types/internal-types-lite.d.ts | /// <reference path="./cy/logGroup.d.ts" />
/// <reference path="./cypress/log.d.ts" />
// All of the types needed by packages/app, without any of the additional APIs used in the driver only
declare namespace Cypress {
interface Cypress {
runner: any
state: State
emit: import('eventemitter2').EventEmitte... | typescript | MIT | 409444f8ea51d8f14dec8d10510f78c4a5f42271 | 2026-01-04T15:36:58.228650Z | false |
cypress-io/cypress | https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/packages/driver/types/window.d.ts | packages/driver/types/window.d.ts | interface ErrorConstructor {
// Cannot use `ErrorConstructor` because it doesn't allow Error as an argument.
new(arg?: string | Error): Error
// Non-standard static method that only exists in Chrome
// @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Error#static_methods
... | typescript | MIT | 409444f8ea51d8f14dec8d10510f78c4a5f42271 | 2026-01-04T15:36:58.228650Z | false |
cypress-io/cypress | https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/packages/driver/types/spec-types.d.ts | packages/driver/types/spec-types.d.ts | // NOTE: This is for internal Cypress spec types that exist in support/utils.js for testing convenience and do not ship with Cypress
declare namespace Cypress {
interface Chainable {
originLoadUtils(origin: string): Chainable
getAll(...aliases: string[]): Chainable
shouldWithTimeout(cb: (subj: {}) => voi... | typescript | MIT | 409444f8ea51d8f14dec8d10510f78c4a5f42271 | 2026-01-04T15:36:58.228650Z | false |
cypress-io/cypress | https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/packages/driver/types/internal-types.d.ts | packages/driver/types/internal-types.d.ts | // NOTE: this is for internal Cypress types that we don't want exposed in the public API but want for development
// TODO: find a better place for this
/// <reference path="./internal-types-lite.d.ts" />
/// <reference path="./spec-types.d.ts" />
/// <reference path="./cypress/log.d.ts" />
interface InternalWindowLoad... | typescript | MIT | 409444f8ea51d8f14dec8d10510f78c4a5f42271 | 2026-01-04T15:36:58.228650Z | false |
cypress-io/cypress | https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/packages/driver/types/cypress/log.d.ts | packages/driver/types/cypress/log.d.ts | // The type declarations for Cypress Logs & the corresponding configuration permutations
declare namespace Cypress {
interface Cypress extends Cypress {
log(options: Partial<LogConfig | InternalLogConfig>): Log | undefined
}
interface Log extends Log {
_hasInitiallyLogged: boolean
get<K extends keyof... | typescript | MIT | 409444f8ea51d8f14dec8d10510f78c4a5f42271 | 2026-01-04T15:36:58.228650Z | false |
cypress-io/cypress | https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/packages/driver/types/cy/logGroup.d.ts | packages/driver/types/cy/logGroup.d.ts | // The type declarations for Cypress Log Group & the corresponding configuration permutations
declare namespace Cypress {
declare namespace LogGroup {
type ApiCallback = (log: Cypress.Log) => Chainable<S> | null
type LogGroup = (cypress: Cypress.Cypress, options: Partial<LogGroupConfig>, callback: LogGroupCal... | typescript | MIT | 409444f8ea51d8f14dec8d10510f78c4a5f42271 | 2026-01-04T15:36:58.228650Z | false |
cypress-io/cypress | https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/packages/telemetry/vitest.config.ts | packages/telemetry/vitest.config.ts | import { defineConfig } from 'vitest/config'
export default defineConfig({
test: {
include: ['test/**/*.spec.ts'],
globals: true,
environment: 'node',
},
})
| typescript | MIT | 409444f8ea51d8f14dec8d10510f78c4a5f42271 | 2026-01-04T15:36:58.228650Z | false |
cypress-io/cypress | https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/packages/telemetry/src/client.ts | packages/telemetry/src/client.ts | import type { Span, Attributes } from '@opentelemetry/api'
import type { startSpanOptions, findActiveSpanOptions, contextObject } from './telemetry/index'
import { Telemetry as TelemetryClass, TelemetryNoop } from './telemetry/index'
import { WebTracerProvider } from '@opentelemetry/sdk-trace-web'
import { browserDetec... | typescript | MIT | 409444f8ea51d8f14dec8d10510f78c4a5f42271 | 2026-01-04T15:36:58.228650Z | false |
cypress-io/cypress | https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/packages/telemetry/src/node.ts | packages/telemetry/src/node.ts | import type { Span } from '@opentelemetry/api'
import type { startSpanOptions, findActiveSpanOptions, contextObject } from './telemetry/index'
import {
envDetectorSync, hostDetectorSync, osDetectorSync, processDetectorSync,
} from '@opentelemetry/resources'
import { BatchSpanProcessor } from '@opentelemetry/sdk-trace... | typescript | MIT | 409444f8ea51d8f14dec8d10510f78c4a5f42271 | 2026-01-04T15:36:58.228650Z | false |
cypress-io/cypress | https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/packages/telemetry/src/span-exporters/ipc-span-exporter.ts | packages/telemetry/src/span-exporters/ipc-span-exporter.ts | import type { ReadableSpan } from '@opentelemetry/sdk-trace-base'
import type {
OTLPExporterError,
} from '@opentelemetry/otlp-exporter-base'
import type { ExportResult } from '@opentelemetry/core'
import { diag } from '@opentelemetry/api'
import { OTLPTraceExporter as OTLPTraceExporterHttp } from '@opentelemetry/ex... | typescript | MIT | 409444f8ea51d8f14dec8d10510f78c4a5f42271 | 2026-01-04T15:36:58.228650Z | false |
cypress-io/cypress | https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/packages/telemetry/src/span-exporters/console-trace-link-exporter.ts | packages/telemetry/src/span-exporters/console-trace-link-exporter.ts | import { ExportResult, ExportResultCode } from '@opentelemetry/core'
import type { ReadableSpan, SpanExporter } from '@opentelemetry/sdk-trace-base'
/**
* Builds and returns a {@link SpanExporter} that logs Honeycomb URLs for completed traces
*
* @remark This is not for production use.
* @param options The {@link... | typescript | MIT | 409444f8ea51d8f14dec8d10510f78c4a5f42271 | 2026-01-04T15:36:58.228650Z | false |
cypress-io/cypress | https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/packages/telemetry/src/span-exporters/websocket-span-exporter.ts | packages/telemetry/src/span-exporters/websocket-span-exporter.ts | import type { ReadableSpan } from '@opentelemetry/sdk-trace-base'
import type {
OTLPExporterError,
} from '@opentelemetry/otlp-exporter-base'
import type { ExportResult } from '@opentelemetry/core'
import { diag } from '@opentelemetry/api'
import { OTLPTraceExporter as OTLPTraceExporterHttp } from '@opentelemetry/ex... | typescript | MIT | 409444f8ea51d8f14dec8d10510f78c4a5f42271 | 2026-01-04T15:36:58.228650Z | false |
cypress-io/cypress | https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/packages/telemetry/src/span-exporters/cloud-span-exporter.ts | packages/telemetry/src/span-exporters/cloud-span-exporter.ts | import type { ReadableSpan } from '@opentelemetry/sdk-trace-base'
import type {
OTLPExporterNodeConfigBase,
OTLPExporterError,
} from '@opentelemetry/otlp-exporter-base'
import { diag } from '@opentelemetry/api'
import { OTLPTraceExporter as OTLPTraceExporterHttp } from '@opentelemetry/exporter-trace-otlp-http'
... | typescript | MIT | 409444f8ea51d8f14dec8d10510f78c4a5f42271 | 2026-01-04T15:36:58.228650Z | false |
cypress-io/cypress | https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/packages/telemetry/src/detectors/circleCiDetectorSync.ts | packages/telemetry/src/detectors/circleCiDetectorSync.ts | import type { DetectorSync, ResourceAttributes, IResource } from '@opentelemetry/resources'
import { Resource } from '@opentelemetry/resources'
/**
* CircleCiDetectorSync can be used to detect the presence of and create a Resource
* from circle ci env variables.
*/
class CircleCiDetectorSync implements DetectorSync... | typescript | MIT | 409444f8ea51d8f14dec8d10510f78c4a5f42271 | 2026-01-04T15:36:58.228650Z | false |
cypress-io/cypress | https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/packages/telemetry/src/detectors/githubActionsDetectorSync.ts | packages/telemetry/src/detectors/githubActionsDetectorSync.ts | import type { DetectorSync, ResourceAttributes, IResource } from '@opentelemetry/resources'
import { Resource } from '@opentelemetry/resources'
/**
* GithubActionsDetectorSync can be used to detect the presence of and create a Resource
* from github actions env variables.
*/
class GithubActionsDetectorSync implemen... | typescript | MIT | 409444f8ea51d8f14dec8d10510f78c4a5f42271 | 2026-01-04T15:36:58.228650Z | false |
cypress-io/cypress | https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/packages/telemetry/src/processors/on-start-span-processor.ts | packages/telemetry/src/processors/on-start-span-processor.ts | import { SimpleSpanProcessor } from '@opentelemetry/sdk-trace-base'
import type { Span } from '@opentelemetry/sdk-trace-base'
import type { Context } from '@opentelemetry/api'
/**
* An implementation of the {@link SpanProcessor} that converts the {@link Span}
* to {@link ReadableSpan} and passes it to the configured... | typescript | MIT | 409444f8ea51d8f14dec8d10510f78c4a5f42271 | 2026-01-04T15:36:58.228650Z | false |
cypress-io/cypress | https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/packages/telemetry/src/telemetry/index.ts | packages/telemetry/src/telemetry/index.ts | import openTelemetry from '@opentelemetry/api'
import { detectResourcesSync, Resource } from '@opentelemetry/resources'
import { SemanticResourceAttributes } from '@opentelemetry/semantic-conventions'
import { OnStartSpanProcessor } from '../processors/on-start-span-processor'
import { ConsoleTraceLinkExporter } from '... | typescript | MIT | 409444f8ea51d8f14dec8d10510f78c4a5f42271 | 2026-01-04T15:36:58.228650Z | false |
cypress-io/cypress | https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/packages/telemetry/test/node.spec.ts | packages/telemetry/test/node.spec.ts | import { describe, it, expect, beforeAll, vi } from 'vitest'
import { telemetry, encodeTelemetryContext, decodeTelemetryContext } from '../src/node'
import { OTLPTraceExporter as OTLPTraceExporterCloud } from '../src/span-exporters/cloud-span-exporter'
// stub out the otlp exporter so we don't send requests to localho... | typescript | MIT | 409444f8ea51d8f14dec8d10510f78c4a5f42271 | 2026-01-04T15:36:58.228650Z | false |
cypress-io/cypress | https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/packages/telemetry/test/browser.spec.ts | packages/telemetry/test/browser.spec.ts | // @ts-expect-error
global.window = {}
import { describe, it, expect, beforeAll } from 'vitest'
import { telemetry } from '../src/client'
import { Telemetry as TelemetryClass } from '../src/telemetry/index'
describe('telemetry is disabled', () => {
describe('init', () => {
it('does not throw', () => {
exp... | typescript | MIT | 409444f8ea51d8f14dec8d10510f78c4a5f42271 | 2026-01-04T15:36:58.228650Z | false |
cypress-io/cypress | https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/packages/telemetry/test/index.spec.ts | packages/telemetry/test/index.spec.ts | import { describe, it, expect } from 'vitest'
import { Telemetry } from '../src/telemetry'
import { NodeTracerProvider } from '@opentelemetry/sdk-trace-node'
import { BatchSpanProcessor } from '@opentelemetry/sdk-trace-base'
import { OTLPTraceExporter as OTLPTraceExporterCloud } from '../src/span-exporters/cloud-span-... | typescript | MIT | 409444f8ea51d8f14dec8d10510f78c4a5f42271 | 2026-01-04T15:36:58.228650Z | false |
cypress-io/cypress | https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/packages/telemetry/test/span-exporters/cloud-span-exporter.spec.ts | packages/telemetry/test/span-exporters/cloud-span-exporter.spec.ts | import { describe, it, expect } from 'vitest'
import type { ReadableSpan } from '@opentelemetry/sdk-trace-base'
import { OTLPTraceExporter } from '../../src/span-exporters/cloud-span-exporter'
const genericRequest = { encryption: { encryptRequest: ({ url, method, body }: {url: string, method: string, body: string}) =>... | typescript | MIT | 409444f8ea51d8f14dec8d10510f78c4a5f42271 | 2026-01-04T15:36:58.228650Z | false |
cypress-io/cypress | https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/packages/telemetry/test/span-exporters/ipc-span-exporter.spec.ts | packages/telemetry/test/span-exporters/ipc-span-exporter.spec.ts | import { describe, it, expect } from 'vitest'
import { OTLPTraceExporter } from '../../src/span-exporters/ipc-span-exporter'
import type { ReadableSpan } from '@opentelemetry/sdk-trace-base'
describe('ipcSpanExporter', () => {
describe('new', () => {
it('new sets delayedExport to an empty array', () => {
c... | typescript | MIT | 409444f8ea51d8f14dec8d10510f78c4a5f42271 | 2026-01-04T15:36:58.228650Z | false |
cypress-io/cypress | https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/packages/telemetry/test/span-exporters/websocket-span-exporter.spec.ts | packages/telemetry/test/span-exporters/websocket-span-exporter.spec.ts | import { describe, it, expect } from 'vitest'
import { OTLPTraceExporter } from '../../src/span-exporters/websocket-span-exporter'
import type { ReadableSpan } from '@opentelemetry/sdk-trace-base'
describe('ipcSpanExporter', () => {
describe('new', () => {
it('new sets delayedExport to an empty array', () => {
... | typescript | MIT | 409444f8ea51d8f14dec8d10510f78c4a5f42271 | 2026-01-04T15:36:58.228650Z | false |
cypress-io/cypress | https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/packages/telemetry/test/span-exporters/console-trace-link-exporter.spec.ts | packages/telemetry/test/span-exporters/console-trace-link-exporter.spec.ts | import { describe, it, expect } from 'vitest'
import { ConsoleTraceLinkExporter } from '../../src/span-exporters/console-trace-link-exporter'
describe('consoleTraceLinkExporter', () => {
describe('new', () => {
it('sets up trace url', () => {
const exporter = new ConsoleTraceLinkExporter({
serviceN... | typescript | MIT | 409444f8ea51d8f14dec8d10510f78c4a5f42271 | 2026-01-04T15:36:58.228650Z | false |
cypress-io/cypress | https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/packages/telemetry/test/detectors/githubActionsDetectorSync.spec.ts | packages/telemetry/test/detectors/githubActionsDetectorSync.spec.ts | import { describe, it, expect, beforeEach, vi } from 'vitest'
import { githubActionsDetectorSync } from '../../src/detectors/githubActionsDetectorSync'
describe('githubActionsDetectorSync', () => {
describe('undefined values', () => {
beforeEach(() => {
vi.unstubAllEnvs()
vi.stubEnv('GITHUB_ACTION', ... | typescript | MIT | 409444f8ea51d8f14dec8d10510f78c4a5f42271 | 2026-01-04T15:36:58.228650Z | false |
cypress-io/cypress | https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/packages/telemetry/test/detectors/circleCiDetectorSync.spec.ts | packages/telemetry/test/detectors/circleCiDetectorSync.spec.ts | import { describe, it, expect, beforeEach, vi } from 'vitest'
import { circleCiDetectorSync } from '../../src/detectors/circleCiDetectorSync'
describe('circleCiDetectorSync', () => {
describe('undefined values', () => {
beforeEach(() => {
vi.unstubAllEnvs()
vi.stubEnv('CIRCLECI', undefined)
vi.... | typescript | MIT | 409444f8ea51d8f14dec8d10510f78c4a5f42271 | 2026-01-04T15:36:58.228650Z | false |
cypress-io/cypress | https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/packages/telemetry/test/processors/on-start-span-processor.spec.ts | packages/telemetry/test/processors/on-start-span-processor.spec.ts | import { describe, it, expect } from 'vitest'
import { OnStartSpanProcessor } from '../../src/processors/on-start-span-processor'
describe('on-start-span-processor', () => {
it('calls onEnd on start', async () => {
const processor = new OnStartSpanProcessor(undefined)
const span = 'span'
const promise ... | typescript | MIT | 409444f8ea51d8f14dec8d10510f78c4a5f42271 | 2026-01-04T15:36:58.228650Z | false |
cypress-io/cypress | https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/packages/scaffold-config/vitest.config.ts | packages/scaffold-config/vitest.config.ts | import { defineConfig } from 'vitest/config'
export default defineConfig({
test: {
include: ['test/**/*.spec.ts'],
globals: true,
environment: 'node',
},
})
| typescript | MIT | 409444f8ea51d8f14dec8d10510f78c4a5f42271 | 2026-01-04T15:36:58.228650Z | false |
cypress-io/cypress | https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/packages/scaffold-config/src/dependencies.ts | packages/scaffold-config/src/dependencies.ts | export const WIZARD_DEPENDENCY_WEBPACK = {
type: 'webpack',
name: 'Webpack',
package: 'webpack',
installer: 'webpack',
description: 'Webpack is a module bundler',
minVersion: '^5.0.0',
} as const
export const WIZARD_DEPENDENCY_VUE_3 = {
type: 'vue',
name: 'Vue.js 3',
package: 'vue',
installer: 'vue... | typescript | MIT | 409444f8ea51d8f14dec8d10510f78c4a5f42271 | 2026-01-04T15:36:58.228650Z | false |
cypress-io/cypress | https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/packages/scaffold-config/src/supportFile.ts | packages/scaffold-config/src/supportFile.ts | import type { CodeLanguage } from '@packages/types'
import dedent from 'dedent'
export function supportFileE2E (language: CodeLanguage['type']) {
return dedent`
// ***********************************************************
// This example support/e2e.${language} is processed and
// loaded automatically ... | typescript | MIT | 409444f8ea51d8f14dec8d10510f78c4a5f42271 | 2026-01-04T15:36:58.228650Z | false |
cypress-io/cypress | https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/packages/scaffold-config/src/component-index-template.ts | packages/scaffold-config/src/component-index-template.ts | import dedent from 'dedent'
export const componentIndexHtmlGenerator = (headModifier: string = '') => {
return () => {
const template = dedent`
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" co... | typescript | MIT | 409444f8ea51d8f14dec8d10510f78c4a5f42271 | 2026-01-04T15:36:58.228650Z | false |
cypress-io/cypress | https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/packages/scaffold-config/src/commandFile.ts | packages/scaffold-config/src/commandFile.ts | import type { CodeLanguage } from '@packages/types'
import dedent from 'dedent'
const COMMAND_TYPES = dedent`
//
// declare global {
// namespace Cypress {
// interface Chainable {
// login(email: string, password: string): Chainable<void>
// drag(subject: string, options?: Partial<TypeOptions>): Cha... | typescript | MIT | 409444f8ea51d8f14dec8d10510f78c4a5f42271 | 2026-01-04T15:36:58.228650Z | false |
cypress-io/cypress | https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/packages/scaffold-config/src/ct-detect-third-party.ts | packages/scaffold-config/src/ct-detect-third-party.ts | import path from 'path'
import globby from 'globby'
import { z } from 'zod'
import fs from 'fs-extra'
import Debug from 'debug'
import findUp from 'find-up'
const debug = Debug('cypress:scaffold-config:ct-detect-third-party')
const DependencySchema = z.object({
type: z.string(),
name: z.string(),
package: z.str... | typescript | MIT | 409444f8ea51d8f14dec8d10510f78c4a5f42271 | 2026-01-04T15:36:58.228650Z | false |
cypress-io/cypress | https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/packages/scaffold-config/src/frameworks.ts | packages/scaffold-config/src/frameworks.ts | import fs from 'fs-extra'
import * as dependencies from './dependencies'
import { componentIndexHtmlGenerator } from './component-index-template'
import debugLib from 'debug'
import semver from 'semver'
import { isThirdPartyDefinition } from './ct-detect-third-party'
import resolvePackagePath from 'resolve-package-path... | typescript | MIT | 409444f8ea51d8f14dec8d10510f78c4a5f42271 | 2026-01-04T15:36:58.228650Z | false |
cypress-io/cypress | https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/packages/scaffold-config/src/detect.ts | packages/scaffold-config/src/detect.ts | import { isDependencyInstalled, WizardBundler } from './frameworks'
import { WIZARD_BUNDLERS } from './dependencies'
import path from 'path'
import fs from 'fs'
import globby from 'globby'
import type { PkgJson } from '.'
import Debug from 'debug'
const debug = Debug('cypress:scaffold-config:detect')
interface Detect... | typescript | MIT | 409444f8ea51d8f14dec8d10510f78c4a5f42271 | 2026-01-04T15:36:58.228650Z | false |
cypress-io/cypress | https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/packages/scaffold-config/src/index.ts | packages/scaffold-config/src/index.ts | /* eslint-disable padding-line-between-statements */
// created by autobarrel, do not modify directly
export * from './commandFile'
export * from './component-index-template'
export * from './ct-detect-third-party'
export * from './dependencies'
export * from './detect'
export * from './frameworks'
export * from './su... | typescript | MIT | 409444f8ea51d8f14dec8d10510f78c4a5f42271 | 2026-01-04T15:36:58.228650Z | false |
cypress-io/cypress | https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/packages/scaffold-config/test/scaffolding.ts | packages/scaffold-config/test/scaffolding.ts | import type { ProjectFixtureDir } from '@tooling/system-tests'
import path from 'path'
import Fixtures from '@tooling/system-tests'
import fs from 'fs-extra'
export async function scaffoldMigrationProject (project: ProjectFixtureDir) {
const projectPath = Fixtures.projectPath(project)
Fixtures.clearFixtureNodeMod... | typescript | MIT | 409444f8ea51d8f14dec8d10510f78c4a5f42271 | 2026-01-04T15:36:58.228650Z | false |
cypress-io/cypress | https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/packages/scaffold-config/test/frameworks.spec.ts | packages/scaffold-config/test/frameworks.spec.ts | import { describe, it, expect, beforeEach, afterEach } from 'vitest'
import fs from 'fs-extra'
import path from 'path'
import os from 'os'
import { isDependencyInstalledByName } from '../src/frameworks'
describe('frameworks', () => {
describe('isDependencyInstalledByName', () => {
const TEMP_DIR = path.join(os.t... | typescript | MIT | 409444f8ea51d8f14dec8d10510f78c4a5f42271 | 2026-01-04T15:36:58.228650Z | false |
cypress-io/cypress | https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/packages/scaffold-config/test/component-index-template.spec.ts | packages/scaffold-config/test/component-index-template.spec.ts | import { describe, it, expect } from 'vitest'
import dedent from 'dedent'
import { componentIndexHtmlGenerator } from '../src/component-index-template'
import { CT_FRAMEWORKS } from '../src/frameworks'
describe('componentIndexHtmlGenerator', () => {
it('strips spaces and newlines appropriately', () => {
const ge... | typescript | MIT | 409444f8ea51d8f14dec8d10510f78c4a5f42271 | 2026-01-04T15:36:58.228650Z | false |
cypress-io/cypress | https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/packages/scaffold-config/test/ct-detect-third-party.spec.ts | packages/scaffold-config/test/ct-detect-third-party.spec.ts | import { describe, it, expect, beforeEach, afterEach } from 'vitest'
import { scaffoldMigrationProject, fakeDepsInNodeModules } from './scaffolding'
import fs from 'fs-extra'
import path from 'path'
import { detectThirdPartyCTFrameworks, validateThirdPartyModule, isThirdPartyDefinition, isRepositoryRoot } from '../src'... | typescript | MIT | 409444f8ea51d8f14dec8d10510f78c4a5f42271 | 2026-01-04T15:36:58.228650Z | false |
cypress-io/cypress | https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/packages/scaffold-config/test/fixtures.ts | packages/scaffold-config/test/fixtures.ts | import { defineComponentFramework } from 'cypress'
export const solidDep: Cypress.CypressComponentDependency = {
type: 'solid-js',
name: 'Solid.js',
package: 'solid-js',
installer: 'solid-js',
description: 'Solid is a declarative JavaScript library for creating user interfaces',
minVersion: '^1.0.0',
}
//... | typescript | MIT | 409444f8ea51d8f14dec8d10510f78c4a5f42271 | 2026-01-04T15:36:58.228650Z | false |
cypress-io/cypress | https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/packages/scaffold-config/test/supportFile.spec.ts | packages/scaffold-config/test/supportFile.spec.ts | import { describe, it, expect } from 'vitest'
import { supportFileComponent } from '../src/supportFile'
import dedent from 'dedent'
describe('supportFileComponent', () => {
describe('react', () => {
const mountModule = 'cypress/react'
it(`handles ${mountModule} and JS`, () => {
const actual = supportF... | typescript | MIT | 409444f8ea51d8f14dec8d10510f78c4a5f42271 | 2026-01-04T15:36:58.228650Z | false |
cypress-io/cypress | https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/packages/scaffold-config/test/detect.spec.ts | packages/scaffold-config/test/detect.spec.ts | import { vi, describe, it, expect, beforeEach } from 'vitest'
import fs from 'fs-extra'
import Fixtures from '@tooling/system-tests'
import { detectFramework, detectLanguage, PkgJson, CT_FRAMEWORKS, resolveComponentFrameworkDefinition, WIZARD_DEPENDENCY_WEBPACK } from '../src'
import path from 'path'
import solidJs, { ... | typescript | MIT | 409444f8ea51d8f14dec8d10510f78c4a5f42271 | 2026-01-04T15:36:58.228650Z | false |
cypress-io/cypress | https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/packages/ts/index.d.ts | packages/ts/index.d.ts | // missing type definitions for libraries
declare module '@cypress/get-windows-proxy' {
type ProxyConfig = {
httpProxy: string
noProxy: string
}
function getWindowsProxy(): Optional<ProxyConfig>
export = getWindowsProxy
}
declare module 'http' {
import { Socket } from 'net'
import { Url } from 'ur... | typescript | MIT | 409444f8ea51d8f14dec8d10510f78c4a5f42271 | 2026-01-04T15:36:58.228650Z | false |
cypress-io/cypress | https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/packages/ts/test/spec.ts | packages/ts/test/spec.ts | /* eslint-disable no-console */
const add = (a: number, b: number) => {
return a + b
}
console.assert(add(10, 2) === 12, '10 + 2 should be 12')
| typescript | MIT | 409444f8ea51d8f14dec8d10510f78c4a5f42271 | 2026-01-04T15:36:58.228650Z | false |
cypress-io/cypress | https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/packages/eslint-config/eslint.config.ts | packages/eslint-config/eslint.config.ts | import { baseConfig } from './src/baseConfig'
export default baseConfig
| typescript | MIT | 409444f8ea51d8f14dec8d10510f78c4a5f42271 | 2026-01-04T15:36:58.228650Z | false |
cypress-io/cypress | https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/packages/eslint-config/src/cliOverrides.ts | packages/eslint-config/src/cliOverrides.ts | /* Rule overrides specifically for CLI packages */
import type { InfiniteDepthConfigWithExtends } from 'typescript-eslint'
export const cliOverrides = [
{
rules: {
'no-console': 'off',
},
},
] satisfies InfiniteDepthConfigWithExtends[]
| typescript | MIT | 409444f8ea51d8f14dec8d10510f78c4a5f42271 | 2026-01-04T15:36:58.228650Z | false |
cypress-io/cypress | https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/packages/eslint-config/src/baseConfig.ts | packages/eslint-config/src/baseConfig.ts | import js from '@eslint/js'
import { InfiniteDepthConfigWithExtends, configs as tsConfigs, parser as tsParser } from 'typescript-eslint'
import cy from 'eslint-plugin-cypress'
import mocha from 'eslint-plugin-mocha'
import globals from 'globals'
import vue from 'eslint-plugin-vue'
import stylistic from '@stylistic/es... | typescript | MIT | 409444f8ea51d8f14dec8d10510f78c4a5f42271 | 2026-01-04T15:36:58.228650Z | false |
cypress-io/cypress | https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/packages/eslint-config/src/index.ts | packages/eslint-config/src/index.ts | export * from './baseConfig'
export * from './cliOverrides'
import * as globalImport from 'globals'
export const globals = {
...globalImport,
specHelper: {
sinon: 'readonly',
expect: 'readonly',
lib: 'readonly',
global: false,
},
}
| typescript | MIT | 409444f8ea51d8f14dec8d10510f78c4a5f42271 | 2026-01-04T15:36:58.228650Z | false |
hexojs/hexo | https://github.com/hexojs/hexo/blob/1fd997c3ad772ab7ed85b71b886d55248d92bb68/test/scripts/helpers/relative_url.ts | test/scripts/helpers/relative_url.ts | import relativeURL from '../../../lib/plugins/helper/relative_url';
describe('relative_url', () => {
it('from root', () => {
relativeURL('', 'css/style.css').should.eql('css/style.css');
relativeURL('index.html', 'css/style.css').should.eql('css/style.css');
});
it('from same root', () => {
relative... | typescript | MIT | 1fd997c3ad772ab7ed85b71b886d55248d92bb68 | 2026-01-04T15:50:29.521527Z | false |
hexojs/hexo | https://github.com/hexojs/hexo/blob/1fd997c3ad772ab7ed85b71b886d55248d92bb68/test/scripts/helpers/image_tag.ts | test/scripts/helpers/image_tag.ts | import Hexo from '../../../lib/hexo';
import imageTag from '../../../lib/plugins/helper/image_tag';
type imageTagParams = Parameters<typeof imageTag>;
type imageTagReturn = ReturnType<typeof imageTag>;
describe('image_tag', () => {
const hexo = new Hexo(__dirname);
const ctx: any = {
config: hexo.config
};
... | typescript | MIT | 1fd997c3ad772ab7ed85b71b886d55248d92bb68 | 2026-01-04T15:50:29.521527Z | false |
hexojs/hexo | https://github.com/hexojs/hexo/blob/1fd997c3ad772ab7ed85b71b886d55248d92bb68/test/scripts/helpers/render.ts | test/scripts/helpers/render.ts | import Hexo from '../../../lib/hexo';
import renderHelper from '../../../lib/plugins/helper/render';
describe('render', () => {
const hexo = new Hexo(__dirname);
const render = renderHelper(hexo);
before(() => hexo.init());
it('default', () => {
const body = [
'foo: 1',
'bar:',
'\tbaz: ... | typescript | MIT | 1fd997c3ad772ab7ed85b71b886d55248d92bb68 | 2026-01-04T15:50:29.521527Z | false |
hexojs/hexo | https://github.com/hexojs/hexo/blob/1fd997c3ad772ab7ed85b71b886d55248d92bb68/test/scripts/helpers/number_format.ts | test/scripts/helpers/number_format.ts | import numberFormat from '../../../lib/plugins/helper/number_format';
describe('number_format', () => {
it('default', () => {
numberFormat(1234.567).should.eql('1,234.567');
});
it('int', () => {
numberFormat(1234567).should.eql('1,234,567');
});
it('precision', () => {
numberFormat(1234.567, {... | typescript | MIT | 1fd997c3ad772ab7ed85b71b886d55248d92bb68 | 2026-01-04T15:50:29.521527Z | false |
hexojs/hexo | https://github.com/hexojs/hexo/blob/1fd997c3ad772ab7ed85b71b886d55248d92bb68/test/scripts/helpers/toc.ts | test/scripts/helpers/toc.ts | import { escapeHTML } from 'hexo-util';
import toc from '../../../lib/plugins/helper/toc';
describe('toc', () => {
const html = [
'<h1 id="title_1">Title 1</h1>',
'<h2 id="title_1_1">Title 1.1</h2>',
'<h3 id="title_1_1_1">Title 1.1.1</h3>',
'<h2 id="title_1_2">Title 1.2</h2>',
'<h2 id="title_1_3"... | typescript | MIT | 1fd997c3ad772ab7ed85b71b886d55248d92bb68 | 2026-01-04T15:50:29.521527Z | false |
hexojs/hexo | https://github.com/hexojs/hexo/blob/1fd997c3ad772ab7ed85b71b886d55248d92bb68/test/scripts/helpers/is.ts | test/scripts/helpers/is.ts | import Hexo from '../../../lib/hexo';
import { current, home, home_first_page, post, page, archive, year, month, category, tag } from '../../../lib/plugins/helper/is';
describe('is', () => {
const hexo = new Hexo(__dirname);
it('is_current', async () => {
await current.call({path: 'index.html', config: hexo.c... | typescript | MIT | 1fd997c3ad772ab7ed85b71b886d55248d92bb68 | 2026-01-04T15:50:29.521527Z | false |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.