Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Setup npm run-script cov

  • Loading branch information...
commit 75d044d9d6c9dd00c27f920d5149021a10dc54b1 1 parent e813748
@andreyvit authored
View
2  .gitignore
@@ -1,3 +1,5 @@
node_modules
*.js
!bin/*.js
+/lib-cov
+coverage.html
View
2  .npmignore
@@ -1,3 +1,5 @@
*.iced
*.coffee
/example
+/lib-cov
+coverage.html
View
4 README.md
@@ -50,6 +50,10 @@ Run:
npm test
+Test coverage report:
+
+ npm run-script cov
+
Output:
colorize
View
5 package.json
@@ -10,7 +10,8 @@
"main": "lib/index.js",
"bin": "bin/json-diff.js",
"scripts": {
- "test": "./node_modules/mocha/bin/mocha"
+ "test": "./node_modules/mocha/bin/mocha",
+ "cov": "rm -rf lib-cov; jscoverage lib lib-cov; env JSLIB=lib-cov mocha -R dot && env JSLIB=lib-cov mocha -R html-cov >coverage.html; open coverage.html"
},
"dependencies": {
"dreamopt": "~0.6.0",
@@ -18,7 +19,7 @@
"cli-color": "~0.1.6"
},
"devDependencies": {
- "mocha": "~1.0.1"
+ "mocha": "~1.7.0"
},
"optionalDependencies": {},
"engines": {
View
2  test/colorize_test.coffee
@@ -1,6 +1,6 @@
assert = require 'assert'
-{ colorizeToArray } = require '../lib/colorize'
+{ colorize, colorizeToArray } = require "../#{process.env.JSLIB or 'lib'}/colorize"
describe 'colorize', ->
View
2  test/diff_test.coffee
@@ -1,6 +1,6 @@
assert = require 'assert'
-{ diff } = require '../lib/index'
+{ diff } = require "../#{process.env.JSLIB or 'lib'}/index"
describe 'diff', ->
Please sign in to comment.
Something went wrong with that request. Please try again.