Giter VIP home page Giter VIP logo

Comments (7)

juliangruber avatar juliangruber commented on July 23, 2024

it might not be easy to do with istanbul, but it is using coverify:

$ browserify -t coverify script.js | tape-run | coverify
TAP version 13
# one
ok 1 true

1..1
# tests 1
# pass  1

# ok

# coverage: 10/10 (100.00 %)

from tape-run.

juliangruber avatar juliangruber commented on July 23, 2024

feel free to reopen if you have further concerns

from tape-run.

bendrucker avatar bendrucker commented on July 23, 2024

For anyone using Istanbul I made tape-istanbul. The example references tape-run but it'll work for anything where you pipe in code and get back console logs as stdout. substack's method in coverify for wrapping code in coverage functions and then extracting coverage data streamingly is a lot more clever. The only reason I made an Istanbul utility is that coverify's deps are a bit out of date and it has some trouble with ES6 transpilation / source maps. Istanbul handles that better at the moment.

from tape-run.

juliangruber avatar juliangruber commented on July 23, 2024

fyi the above would work with node as well:

$ browserify -t coverify script.js | node | coverify

good to know about tape-istanbul though!

from tape-run.

flekschas avatar flekschas commented on July 23, 2024

When I run rollup -c ./rollup.test.config.js | tape-run | coverify the output of coverify is always empty even though tape-run prints test results. Did something general change? I noticed that tape-istanbul also doesn't output anything.

from tape-run.

juliangruber avatar juliangruber commented on July 23, 2024

Did you include the coverify plugin in your rollup setup?

from tape-run.

flekschas avatar flekschas commented on July 23, 2024

Oh nevermind, I guess it's not actually possible to use coverify in combination with rollup. My bad! :)

from tape-run.

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.