fix(types): should() cannot be used with values. (#16744)

Co-authored-by: Chris Breiding <chrisbreiding@users.noreply.github.com>
This commit is contained in:
Kukhyeon Heo
2021-06-03 03:42:23 +09:00
committed by GitHub
parent 49990480bd
commit 31bd0e937f
2 changed files with 20 additions and 0 deletions

View File

@@ -178,3 +178,7 @@ cy.window().then(window => {
window.eval('1')
})
const a = 1
// $ExpectError
a.should("be.visible")

View 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;
+// }