GithubHelp home page GithubHelp logo

code coverage? about component-test HOT 7 OPEN

stephenmathieson avatar stephenmathieson commented on August 23, 2024
code coverage?

from component-test.

Comments (7)

Swatinem avatar Swatinem commented on August 23, 2024

Would be really awesome, also to integrate with node-coveralls Is mocha-phantomjs up for the task?

from component-test.

stephenmathieson avatar stephenmathieson commented on August 23, 2024

@Swatinem idk if mocha-phantomjs will support it. setting that up on one my apps is on my todo list. if it's not, i plan on making it -- haha.

from component-test.

Swatinem avatar Swatinem commented on August 23, 2024

It’s been ages since I worked with mocha-phantomjs myself.
https://github.com/metaskills/mocha-phantomjs#jsoncov-reporter
Well there is this. No idea if that can easily be integrated with https://github.com/StevenLooman/mocha-lcov-reporter, to be used by https://github.com/cainus/node-coveralls though.

from component-test.

matthewmueller avatar matthewmueller commented on August 23, 2024

Code coverage would be awesome.

from component-test.

dominicbarnes avatar dominicbarnes commented on August 23, 2024

+1

My current test harness uses CoverJS, but I would like to switch over to component-test because of how nicely it packages all these things together. :)

from component-test.

Swatinem avatar Swatinem commented on August 23, 2024

So I have played with this a bit and come up with: https://github.com/Swatinem/component-istanbul
This is just a small module that pipes files through istanbul for instrumentation.
Then you can use the extremely ugly command line to get a report:

$ mkdir -p coverage && component test phantom -R node_modules/component-istanbul/reporter.js > coverage/coverage.json && istanbul report

Comments welcome :-)

(oh, and you need the latest PR to have an uptodate mocha-phantomjs)

from component-test.

Swatinem avatar Swatinem commented on August 23, 2024

With my latest PR, you can just pass '--coverage coverage/coverage.json' and it will write to that file. I’m quite happy with that now.

from component-test.

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.