gotwarlost / istanbul-middleware

Connect middleware for server side code coverage using istanbul
Other
179 stars 96 forks source link

Features and thoughts #4

Closed josx closed 10 years ago

josx commented 11 years ago
gotwarlost commented 11 years ago

Point 1: this is already available GET / should give you the info and you can drill down (/ is w.r.t to the mount point you used for coverage - if it is '/coverage' then the path would be '/coverage/')

Point 2: instrumenting is possible but unless you persist the generated files to the file system and pass it to the instrumenter as the file name, HTML report generation will fail since it needs access to the source.

josx commented 11 years ago

Thanks for your quickly answer.

1) I dont get it well how i can show Client coverage from express. Right now I have some tests with phantoms running and I am getting a .zip file thru /download (on zip file client coverage is OK)

When I run my app (not my tests) I only get server coveragre thru /coverage

What I am doing wrong?

2) There is no way to give the JS that serves Express?

gotwarlost commented 11 years ago
  1. After running the tests client-side you need to POST the window.__coverage__ object to /client under the coverage mount path. The server will then accumulate the client coverage as well.
  2. See the details on how to write a client handler without using the default. If you provide a simple example, I can help you with what you are trying to do.
gotwarlost commented 10 years ago

Closing this due to lack of activity. Reopen if needed.