Permalink
Browse files

added jscoverage, makefile

  • Loading branch information...
1 parent 3d4df71 commit a1d1f1cbbecc3aec28913ad4fb9d109a13fdf935 @mashpie committed Mar 10, 2013
Showing with 16 additions and 3 deletions.
  1. +12 −0 Makefile
  2. +2 −2 test/i18n.configure.js
  3. +2 −1 test/i18n.test.js
View
@@ -0,0 +1,12 @@
+REPORTER = spec
+
+test:
+ @NODE_ENV=test mocha --reporter $(REPORTER)
+
+test-cov: lib-cov
+ @EXPRESS_COV=1 $(MAKE) test REPORTER=html-cov > coverage.html
+
+lib-cov:
+ @jscoverage i18n.js i18n-cov.js
+
+.PHONY: test
View
@@ -1,7 +1,7 @@
/*jslint nomen: true, undef: true, sloppy: true, white: true, stupid: true, passfail: false, node: true, plusplus: true, indent: 2 */
-var should = require("should"),
- i18n = require('../i18n'),
+var i18n = process.env.EXPRESS_COV ? require('../i18n-cov') : require('../i18n'),
+ should = require("should"),
fs = require('fs');
describe('Module Config', function () {
View
@@ -1,6 +1,7 @@
/*jslint nomen: true, undef: true, sloppy: true, white: true, stupid: true, passfail: false, node: true, plusplus: true, indent: 2 */
-var i18n = require('../i18n'),
+// now with coverage suport
+var i18n = process.env.EXPRESS_COV ? require('../i18n-cov') : require('../i18n'),
should = require("should");
i18n.configure({

0 comments on commit a1d1f1c

Please sign in to comment.