Git Product home page Git Product logo

Comments (4)

vstanciu47 avatar vstanciu47 commented on June 21, 2024 1

I figured out what was wrong and fixed the issue on my side. It was because of .nycrc file. It basically told the tests to look for coverage in all the .ts files, but the problem was that my components library wasn't imported in storybook with the ts files, we actually build the library into a package and imported that in storybook. It was imported in preview.js as a js file. Removing .nycrc made all the components appear in the test coverage report

from test-runner.

valentinpalkovic avatar valentinpalkovic commented on June 21, 2024

Hi @vstanciu47

Thank you for reporting the issue.

I have prepared a canary release for Storybook, which might fix the issue. Could you please try it out?

npx [email protected] upgrade

Also please install the following version for @storybook/addon-coverage: 1.0.4--canary.42.041aa23.0

from test-runner.

vstanciu47 avatar vstanciu47 commented on June 21, 2024

npx [email protected] upgrade

Thanks for your reply. Unfortunately the fix is not working for me. What has change is that now story files are included in the coverage report, but I don't think that is necessary. Components files are still not included in the report.
Card report before canary release
image
Card report with canary release
image

I also tried a fresh install of storybook with a new repository and the components are still not included in the coverage report.

from test-runner.

valentinpalkovic avatar valentinpalkovic commented on June 21, 2024

Could you provide this sample repository?

from test-runner.

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.