•  
      request #19373 Separate Cypress and Jest TypeScript globals
    Infos
    #19373
    Joris MASSON (jmasson)
    2021-02-26 11:15
    2021-02-25 17:22
    20964
    Details
    Separate Cypress and Jest TypeScript globals

    Cypress and Jest both define the same globals describe, it, beforeEach, etc. When we run our Jest test suite, nothing prevents it from pulling the global types from Cypress, which will cause the test suite to fail because expect is different between them. We should adjust our tsconfig.json files to prevent that and only pull global types that we actually need instead of the default behaviour of pulling everything.

    See this example repo that was setup by the cypress people to show how to separate Jest from Cypress.

    Also, something weird can happen where Jest will cause a compilation of typescript files from unrelated plugins when running tests. For example, Jest will fail a test in Timetracking plugin because of an unknown error in AgileDashboard or Document. This request will fix that too.

    Dev tools
    Empty
    Empty
    • [ ] enhancement
    • [x] internal improvement
    Empty
    Stage
    Joris MASSON (jmasson)
    Closed
    2021-02-26
    Attachments
    Empty
    References

    Follow-ups

    User avatar
    Joris MASSON (jmasson)2021-02-25 17:30
    • Original Submission
      Something went wrong, the follow up content couldn't be loaded
      Only formatting have been changed, you should switch to markup to see the changes