Permalink
Browse files

Update Makefile.

  • Loading branch information...
1 parent d1408bf commit e558e567126bf68a02d2a2fad69459c8e37c3407 @jaredhanson committed Aug 1, 2013
Showing with 49 additions and 30 deletions.
  1. +27 −22 Makefile
  2. +10 −0 package.json
  3. +3 −0 test/bootstrap/testling.js
  4. +0 −8 test/index.test.js
  5. +9 −0 test/module.test.js
View
@@ -1,44 +1,49 @@
SOURCES = *.js
TESTS = test/*.test.js
-# ==============================================================================
-# Node Tests
-# ==============================================================================
+lint: lint-jshint
+test: test-mocha
+test-cov: test-istanbul-mocha
+view-cov: view-istanbul-report
-MOCHA = ./node_modules/.bin/mocha
-test: test-node
-test-node: node_modules
- $(MOCHA) \
- --reporter spec \
- --require test/bootstrap/node $(TESTS)
+# ==============================================================================
+# Node.js
+# ==============================================================================
+include support/mk/node.mk
+include support/mk/mocha.mk
-node_modules:
- npm install
+# ==============================================================================
+# Browserify
+# ==============================================================================
+BROWSERIFY_MAIN = ./index.js
+include support/mk/browserify.mk
+include support/mk/testling.mk
# ==============================================================================
# Code Quality
# ==============================================================================
+include support/mk/notes.mk
+include support/mk/jshint.mk
+include support/mk/istanbul.mk
-JSHINT = jshint
-
-hint: lint
-lint:
- $(JSHINT) $(SOURCES)
+# ==============================================================================
+# Continuous Integration
+# ==============================================================================
+include support/mk/coveralls.mk
+ci-travis: test test-cov
+submit-coverage-to-coveralls: submit-istanbul-lcov-to-coveralls
# ==============================================================================
# Clean
# ==============================================================================
-
clean:
rm -rf build
+ rm -rf reports
-clobber: clean
- rm -rf node_modules
- rm -rf components
- rm -rf test/www/js/lib
+clobber: clean clobber-node
-.PHONY: test test-node hint lint clean clobber
+.PHONY: lint test test-cov view-cov ci-travis clean clobber
View
@@ -35,5 +35,15 @@
},
"scripts": {
"test": "node_modules/.bin/mocha --reporter spec --require test/bootstrap/node test/*.test.js"
+ },
+ "testling": {
+ "browsers": [
+ "chrome/latest"
+ ],
+ "harness" : "mocha",
+ "files": [
+ "test/bootstrap/testling.js",
+ "test/*.test.js"
+ ]
}
}
@@ -0,0 +1,3 @@
+var chai = require('chai');
+
+window.expect = chai.expect;
View
@@ -1,13 +1,5 @@
var merge = require('../index');
-describe('utils-merge', function() {
-
- it('should export function', function() {
- expect(merge).to.be.a('function');
- });
-
-});
-
describe('merge', function() {
describe('an object', function() {
View
@@ -0,0 +1,9 @@
+var merge = require('../index');
+
+describe('utils-merge', function() {
+
+ it('should export function', function() {
+ expect(merge).to.be.a('function');
+ });
+
+});

0 comments on commit e558e56

Please sign in to comment.