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

Some issues based on today's state of Cypress code coverage #69

Open
glambert opened this issue Apr 15, 2020 · 5 comments
Open

Some issues based on today's state of Cypress code coverage #69

glambert opened this issue Apr 15, 2020 · 5 comments

Comments

@glambert
Copy link

Hey there @bahmutov and team,

I've been writing up an internal recipe on how to install Cypress for a Next.js app, along with code coverage, CircleCI and all goodies to have a fully working setup. Here's a few things I noted while following both this repo and some of the other examples (mainly https://github.com/lluia/cypress-typescript-coverage-example):

  1. Code coverage instrumentation is served to users, compared to https://github.com/lluia/cypress-typescript-coverage-example/blob/ae6c8a3fc0143f15943ee50e248accb0e011c467/babelrc.js#L4 which is prevent it from being bundled in

  2. Cypress 3.8.3 is used which makes the cypress/plugins/index.js portion obsolete when using Cypress 4 and up (using 4.4.0 here at the moment):

    module.exports = (on, config) => {
      require('@cypress/code-coverage/task')(on, config);
      return config;
    };

If you agree the repo should be updated to use the latest Cypress version I can open a PR and update it accordingly.

Keep up the good work on Cypress, loving the latest version!

@bahmutov
Copy link
Owner

Hi @glambert - absolutely, I would love an update, there are PRs opened by renovate bot, but I did not get a chance to get to them yet. Any help would be great, and now v3 of code coverage plugin includes pretty much everything needed to run, so the example should be even simpler

@glambert
Copy link
Author

@bahmutov here's the public repo I've created serving as an example: https://github.com/glambert/nextjs-cypress-setup

@paleite
Copy link

paleite commented May 10, 2020

@glambert I'm getting a 404 on that link. Is the repo public?

@glambert
Copy link
Author

@paleite not anymore because I used that repo for internal usage, but if you have specific questions I can help out!

@kylemh
Copy link

kylemh commented Jan 12, 2021

Got this handled here FWIW

https://github.com/kylemh/next-ts-with-cypress-coverage

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

4 participants