You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
After upgrading to from 1.1.4 to 1.2, I started getting type definition conflicts between cypress and jest. Obviously, this probably only affects projects that use both cypress and jest. Looks like the almost the same issue as #1087, the only difference being that in my case, the conflicts are with @types/jest, as opposed to @types/chai
Desired behavior:
No conflicts
Additional Info (images, stack traces, etc)
ERROR in [at-loader] ./node_modules/@types/jest/index.d.ts:15:13
TS2300: Duplicate identifier 'beforeEach'.
ERROR in [at-loader] ./node_modules/@types/jest/index.d.ts:17:13
TS2300: Duplicate identifier 'afterEach'.
ERROR in [at-loader] ./node_modules/@types/mocha/index.d.ts:36:13
TS2403: Subsequent variable declarations must have the same type. Variable 'describe' must be of type 'Describe', but here has type 'IContextDefinition'.
ERROR in [at-loader] ./node_modules/@types/mocha/index.d.ts:37:13
TS2403: Subsequent variable declarations must have the same type. Variable 'xdescribe' must be of type 'Describe', but here has type 'IContextDefinition'.
ERROR in [at-loader] ./node_modules/@types/mocha/index.d.ts:42:13
TS2403: Subsequent variable declarations must have the same type. Variable 'it' must be of type 'It', but here has type 'ITestDefinition'.
ERROR in [at-loader] ./node_modules/@types/mocha/index.d.ts:43:13
TS2403: Subsequent variable declarations must have the same type. Variable 'xit' must be of type 'It', but here has type 'ITestDefinition'.
ERROR in [at-loader] ./node_modules/@types/mocha/index.d.ts:45:13
TS2403: Subsequent variable declarations must have the same type. Variable 'test' must be of type 'It', but here has type 'ITestDefinition'.
ERROR in [at-loader] ./node_modules/@types/mocha/index.d.ts:59:18
TS2451: Cannot redeclare block-scoped variable 'before'.
ERROR in [at-loader] ./node_modules/@types/mocha/index.d.ts:60:18
TS2451: Cannot redeclare block-scoped variable 'before'.
ERROR in [at-loader] ./node_modules/@types/mocha/index.d.ts:63:18
TS2300: Duplicate identifier 'beforeEach'.
ERROR in [at-loader] ./node_modules/@types/mocha/index.d.ts:64:18
TS2300: Duplicate identifier 'beforeEach'.
ERROR in [at-loader] ./node_modules/@types/mocha/index.d.ts:65:18
TS2300: Duplicate identifier 'afterEach'.
ERROR in [at-loader] ./node_modules/@types/mocha/index.d.ts:66:18
TS2300: Duplicate identifier 'afterEach'.
The text was updated successfully, but these errors were encountered:
Yes, I think this is related to #1087. I think a solution to all type conflicts should be discussed there. Fixing that issue should also solve this one.
Cypress 1.2 added type definitions to the embedded Cypress.$, Cypress._ and references mocha and sinon type globals which is why these are in conflict. I'm writing a proposal in #1087.
Is this a Feature or Bug?
Bug
Current behavior:
After upgrading to from
1.1.4
to1.2
, I started getting type definition conflicts betweencypress
andjest
. Obviously, this probably only affects projects that use bothcypress
andjest
. Looks like the almost the same issue as #1087, the only difference being that in my case, the conflicts are with@types/jest
, as opposed to@types/chai
Desired behavior:
No conflicts
Additional Info (images, stack traces, etc)
The text was updated successfully, but these errors were encountered: