Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Merge branch 'master' of github.com:nearinfinity/node-covershot

  • Loading branch information...
commit eb8876b3ea797355caca4e06130b721f1fef5e60 2 parents f1d231a + e754eb9
@pilks pilks authored
View
40 README.md
@@ -1,18 +1,50 @@
-UNDER DEVELOPMENT. DO NOT USE YET.
-
# covershot
-Multi-format code coverage report generator
+Multi-format, test framework agnostic, code coverage report generator.
## Installation
-
+
$ npm install covershot
## Usage
+- use covershot's require in your unit tests
+
```javascript
+var csrequire = require('covershot').require.bind(null, require);
+var myLibrary = csrequire('../lib/myLibrary');
+```
+
+- instrument your code using [jscoverage](http://siliconforks.com/jscoverage/)
+
+```bash
+jscoverage --no-highlight lib lib-cov
+```
+
+- generate code metrics (optional) using [jsmeter](https://github.com/joeferner/node-jsmeter)
+
+```bash
+./node_modules/node-jsmeter/bin/jsmeter.js -o ./covershot/jsmeter/ ./lib/
```
+- run your unit tests
+
+```bash
+npm test
+```
+
+- generate a coverage report
+
+```bash
+./node_modules/covershot/bin/covershot covershot/data -f html -f clover -f json
+```
+
+## Example report
+
+![coverage!](https://github.com/nearinfinity/node-covershot/raw/master/examples/coverage.png)
+
+###
+
## License
(The MIT License)
View
BIN  examples/coverage.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
5 lib/format/html/src.ejs
@@ -54,8 +54,9 @@
<section id="bod">
<section id="mainContent">
<script type="syntaxhighlighter" class="brush: js; class-name: 'rounded'"><![CDATA[
- <% for (var i in source) { %>
- <%= source[i].line %> <% } %> ]]></script>
+ <% for (var i in source) { %>
+ <%- source[i].line %><% } %>
+ ]]></script>
</section>
</section>
</div>
View
2  package.json
@@ -1,6 +1,6 @@
{
"name": "covershot",
- "description": "Code coverage report generator that's easy on the eyes",
+ "description": "Multi-format, test framework agnostic, code coverage report generator.",
"author": "Jeff Kunkle <jeff.kunkle@nearinfinity.com>",
"keywords": [
"test",
Please sign in to comment.
Something went wrong with that request. Please try again.