lloyd / ass Goto Github PK
View Code? Open in Web Editor NEWA node.js code coverage library which aggregates stats cross process.
License: Other
A node.js code coverage library which aggregates stats cross process.
License: Other
I talked to them on Twitter as well.
We need a very flexible and ergonomic way for the client to specify which files are to be instrumented and reported on.
'cause it's a lot of dependencies if you don't want the button, e.g. mozilla/fxa-auth-db-server#16 (diff)
ass
is designed to work on a child process. However, it doesn't support node -p
.
For instance, the following change on line 14 of the current example:
kid = cp.spawn("node", ["-p", "require('ass');require('./server')"], { stdio: 'inherit' });
yields the following error:
/example/node_modules/ass/node_modules/blanket/src/index.js:203
args[1].indexOf(join('node_modules','mocha','bin')) > -1 &&
^
TypeError: Cannot call method 'indexOf' of undefined
…
at Object.<anonymous> (/example/node_modules/ass/index.js:119:3)
This may be an upstream bug in Blanket.
when we fork a process running under a controlling blanket process, we need a robust but seamless way of instrumenting the initial file. see example/server.js
. This server is forked, but server.js
itself is not instrumented.
Hi lloyd,
I was trying to generate two reports: HTML and JSON, the second one always fail with the following error:
fs.js:427
return binding.open(pathModule._makeLong(path), stringToFlags(flags), mode);
^
Error: ENOENT, no such file or directory '/home/luis/tmp/ass-coverage-data11409-8460-11mpjwe/8462.json'
at Object.fs.openSync (fs.js:427:18)
at Object.fs.readFileSync (fs.js:284:15)
at /home/luis/noboxout/class/node_modules/ass/index.js:83:34
at Array.forEach (native)
at /home/luis/noboxout/class/node_modules/ass/index.js:81:69
at Object.oncomplete (fs.js:107:15)
I suspect that after ass.report those file are deleted and see two possible approaches (if I'm right), listen SIGTERM and remove those files, or a new API to generate multiple outputs.
PoC
git clone https://github.com/llafuente/class.git
cd class
npm install
vi test/run.js
# search "ass error" and uncomment those 3 lines
npm run-script coverage
Thanks for this module!
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.