argon
argon copied to clipboard
Code Coverage
Using Istanbul and Remap-Istanbul.
The basic code flow is:
- The tests page now instruments all of argon's code with
istanbul.
- Tests are run, as before. This also records coverage information because of the instrumentation.
- The tests page reports the coverage information along with the transpiled js (from ts), and sourcemaps representing that transpilation down to the node server using
socket.io
(included withbrowser-sync
). - The node server uses
remap-istanbul
to apply the sourcemaps to the transpiled js in order to get coverage data for the original typescript. - The typescript coverage information is turned into a html report at
coverage/index.html
usingistanbul
.
If there's a way to reduce the amount of chnages to the jspm.config.js
file, I'd love to know. Simply adding istanbul
, escodegen
, and esprima
seems to have pulled in about 400 lines of configuration information for their dependencies.
The only way to reduce the amount of dependencies that are pulled in is to add an override in package.json
which maps everything you don't need to @empty
. I don't think we need any of the nodejs related dependencies since all of our test code runs in the browser. See if you can fix that.
Also, can we have the coverage results output somewhere other than in the src folder?
The coverage should be output to the coverage
folder, is it being put in the src
folder when you run it?