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

Idea: Provide .d.ts file of the removed types to allow e2e types to use globals #77

Open
cg-roling opened this issue Sep 15, 2023 · 0 comments

Comments

@cg-roling
Copy link

I'm really just wrapping my head around how this all works, so apologies if this isn't actually possible.

My understanding is that local-cypress:

  1. Patches the Cypress package to comment out global type declarations
  2. Provides those fomerly-global types to be imported into tests

In our Angular project, we have lots and lots of e2e tests that work just fine with the global types.

We're just starting to get into component tests, and would like to put the side-by-side with the components themselves, so local-cypress seems necessary to get around type conflicts with our Jasmine tests.

If local-cypress provided a .d.ts file with the global types it removed from Cypress, I believe I could reference that in my Cypress directory to allow the e2e tests to have global types, while using local types for the component tests.

Currently I'm working around doing exactly this by creating a .d.ts file locally with all of the removed types, but it would be nice if that were done internally in local-cypress, so that it can't get out of sync.

Thoughts? Maybe there's an easy way to do all of this and I'm making way too much work out of it?

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

1 participant