Giter Site home page Giter Site logo

Support react-scripts v5 about instrument-cra HOT 8 OPEN

artivilla avatar artivilla commented on June 11, 2024 13
Support react-scripts v5

from instrument-cra.

Comments (8)

elylucas avatar elylucas commented on June 11, 2024 3

Hey all on this thread, I put together a CRA 5 TS project with Cypress 10 that has e2e and CT, and its seems to work fine with CRA5. We are working on updating docs and such to cover CT well, but if you want to take a look at this example to see how it is put together and let me know if you run into any issues with CRA5 and this plugin. Thanks!

https://github.com/elylucas/cypress-cra-code-coverage-example

from instrument-cra.

SeraphyBR avatar SeraphyBR commented on June 11, 2024 2

looks like the repository is dead...

from instrument-cra.

indatawetrust avatar indatawetrust commented on June 11, 2024 1

if you are using craco like package, adding the babel-plugin-istanbul package during testing solves the coverage issues

from instrument-cra.

SeraphyBR avatar SeraphyBR commented on June 11, 2024

This is the only thing preventing me from updating react-scripts

from instrument-cra.

banuni avatar banuni commented on June 11, 2024

For me it works with CRA 5....but I guess this should be specified in the docs in any case...

from instrument-cra.

SeraphyBR avatar SeraphyBR commented on June 11, 2024

@banuni here the last time I tested when I check the coverage information, many files are missing, as if I had not collected coverage

from instrument-cra.

luizeboli avatar luizeboli commented on June 11, 2024

My app does not render its content when using react-scripts -r @cypress/instrument-cra start.

Using react-scripts v5. No error is logged. A blank screen is rendered.


Ok, trying to figure out whats happening...

We use a PUBLIC_URL env set as /app.

When instrumenting the app it injects the bundle without this public url prefix, causing a 404 error.
image

Seems like I have to prefix this env in start command: PUBLIC_URL=/app react-scripts -r @cypress/instrument-cra start.


Instrumentation seems ok now, I'll update if needed.

from instrument-cra.

hyungjunk avatar hyungjunk commented on June 11, 2024

I looked over the repository @elylucas suggested, it worked fine in the repository but didn't on my own repo although the setting files were the same.

And I found that it was about test code that visits and tests the wrong website, not the one that is running on my local server :( Make sure the test codes visits and tests your web if someone is experiencing the same problem

from instrument-cra.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.