mirror of
https://github.com/cypress-io/cypress.git
synced 2026-03-09 10:09:52 -05:00
fix(types): should() cannot be used with values. (#16744)
Co-authored-by: Chris Breiding <chrisbreiding@users.noreply.github.com>
This commit is contained in:
@@ -178,3 +178,7 @@ cy.window().then(window => {
|
||||
|
||||
window.eval('1')
|
||||
})
|
||||
|
||||
const a = 1
|
||||
// $ExpectError
|
||||
a.should("be.visible")
|
||||
|
||||
16
patches/@types+chai+4.2.15.patch
Normal file
16
patches/@types+chai+4.2.15.patch
Normal file
@@ -0,0 +1,16 @@
|
||||
diff --git a/node_modules/@types/chai/index.d.ts b/node_modules/@types/chai/index.d.ts
|
||||
index da5992c..67bafac 100644
|
||||
--- a/node_modules/@types/chai/index.d.ts
|
||||
+++ b/node_modules/@types/chai/index.d.ts
|
||||
@@ -1949,6 +1949,8 @@ declare module "chai" {
|
||||
export = chai;
|
||||
}
|
||||
|
||||
-interface Object {
|
||||
- should: Chai.Assertion;
|
||||
-}
|
||||
+// const a = 1; a.should(1); doesn't work with Cypress
|
||||
+// https://github.com/cypress-io/cypress/issues/16548
|
||||
+// interface Object {
|
||||
+// should: Chai.Assertion;
|
||||
+// }
|
||||
Reference in New Issue
Block a user