Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

@types/jest conflicts #1091

Closed
kirjai opened this issue Dec 19, 2017 · 3 comments
Closed

@types/jest conflicts #1091

kirjai opened this issue Dec 19, 2017 · 3 comments

Comments

@kirjai
Copy link

kirjai commented Dec 19, 2017

  • Operating System: Mac OS 10.13
  • Cypress Version: 1.2
  • Browser Version: Chrome 62

Is this a Feature or Bug?

Bug

Current behavior:

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'.
@NicholasBoll
Copy link
Contributor

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.

@kirjai
Copy link
Author

kirjai commented Dec 19, 2017

Closing in favour of #1087

@kirjai kirjai closed this as completed Dec 19, 2017
@NicholasBoll
Copy link
Contributor

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants