Comments (7)
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.
feel free to reopen if you have further concerns
from tape-run.
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.
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.
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.
Did you include the coverify plugin in your rollup setup?
from tape-run.
Oh nevermind, I guess it's not actually possible to use coverify in combination with rollup. My bad! :)
from tape-run.
Related Issues (20)
- how can I include a js file? HOT 11
- Inconsistent environments for `tape-run` and `tape-run -p` HOT 1
- window.location.search goes wild HOT 5
- Doesn't say much upon errors HOT 7
- support for other bundler webpack and rollup HOT 2
- webpack-tape-run HOT 1
- `</script>` tags inside the JS input causing errors. HOT 1
- How to resize the browser window HOT 3
- How to reset browser window state between tests? HOT 2
- Weird static files behaviour with and without --port HOT 7
- Errors on Travis HOT 2
- Pipe to "tap-mocha-reporter" doesn't work
- Doesn't work on Ubuntu 18.04 HOT 5
- Outdated Deps? HOT 3
- internal/streams/legacy.js:59 unhandled stream error on pipe HOT 1
- --node and --basedir appear to not be working HOT 3
- Does not work in WSL HOT 3
- Use a more recent browser-run version to pass the no-sandbox option to electron-stream HOT 2
- option `--browser=chrome` not working HOT 4
- tape-run is triggering some dependabot alerts HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from tape-run.