Uh oh!
There was an error while loading. Please reload this page.
Code Coverage - #7
Conversation
devoncooper42
commented
Mar 8, 2016
If there's a way to reduce the amount of chnages to the |
the-reality-engineer
commented
Mar 10, 2016
The only way to reduce the amount of dependencies that are pulled in is to add an override in Also, can we have the coverage results output somewhere other than in the src folder? |
devoncooper42
commented
Mar 10, 2016
The coverage should be output to the |
f76e51e to
1188156CompareA few problems need to still be solved: * Automatically writing the coverage data to a file. As mentioned in one of the comments in test/index.html, this can be done with the browser file api which is only supported by chrome at the moment, or perhaps by using web sockets to send the data back to the server which can then write the file to disk. * Source maps - currently istanbul's code coverage is based on the transpiled typescript, and so does not accurately reflect the original code. It's possible to connect the two mentally, but difficult. The remap-istanbul project may be of use here. * The method of injecting istanbul into the SystemJS module loader is a bit of a hack; we can probably make it a cleaner hack by writing a SystemJS plugin which we use specifically for loading our files during testing.
Aka the previous coverage reports over the transpiled js (from ts) now have sourcemaps applied to them so that the coverage reports are now over ts. Also made coverage reports be automatically written as the tests are run.
1188156 to
d61d48dCompare
Using Istanbul and Remap-Istanbul.
The basic code flow is:
istanbul.socket.io(included withbrowser-sync).remap-istanbulto apply the sourcemaps to the transpiled js in order to get coverage data for the original typescript.coverage/index.htmlusingistanbul.