Skip to content

Commit a7e777a

Browse files
authored
chore: adds a .d.ts file that adds jQuery to global window for the driver jquery.cy.ts test (#32698)
1 parent 04bd3f1 commit a7e777a

File tree

2 files changed

+9
-1
lines changed

2 files changed

+9
-1
lines changed

packages/driver/cypress/e2e/dom/jquery.cy.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
1+
/// <reference path="./jquery.d.ts" />
2+
13
describe('src/dom/jquery', () => {
24
context('.isJquery', () => {
35
it('does not get confused when window contains jquery function', () => {
4-
// @ts-expect-error - Intentionally adding jquery property to test conflict detection
56
window.jquery = () => {}
67

78
expect(Cypress.dom.isJquery(window)).to.be.false
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
declare global {
2+
interface Window {
3+
jquery: () => void | undefined | null
4+
}
5+
}
6+
7+
export {}

0 commit comments

Comments
 (0)