Permalink
Browse files

Stub out test suite.

  • Loading branch information...
1 parent 48dee8d commit b081a832f68262425f73ff4bd97e5b96f67c7e5d @jaredhanson committed May 2, 2013
Showing with 62 additions and 1 deletion.
  1. +20 −0 LICENSE
  2. +28 −0 Makefile
  3. +1 −1 package.json
  4. +10 −0 test/index.test.js
  5. +3 −0 test/node/bootstrap.js
View
20 LICENSE
@@ -0,0 +1,20 @@
+(The MIT License)
+
+Copyright (c) 2012-2013 Jared Hanson
+
+Permission is hereby granted, free of charge, to any person obtaining a copy of
+this software and associated documentation files (the "Software"), to deal in
+the Software without restriction, including without limitation the rights to
+use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
+the Software, and to permit persons to whom the Software is furnished to do so,
+subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
+FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
+COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
+IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
View
@@ -0,0 +1,28 @@
+SOURCES = lib/**/*.js
+TESTS = test/*.test.js
+
+# ==============================================================================
+# Node Tests
+# ==============================================================================
+
+MOCHA = ./node_modules/.bin/mocha
+
+test: test-node
+test-node:
+ @NODE_PATH=./lib \
+ $(MOCHA) \
+ --reporter spec \
+ --require test/node/bootstrap $(TESTS)
+
+# ==============================================================================
+# Static Analysis
+# ==============================================================================
+
+JSHINT = jshint
+
+hint: lint
+lint:
+ $(JSHINT) $(SOURCES)
+
+
+.PHONY: test test-node hint lint
View
@@ -27,7 +27,7 @@
"chai": "1.x.x"
},
"scripts": {
- "test": "NODE_PATH=lib node_modules/.bin/mocha"
+ "test": "NODE_PATH=./lib node_modules/.bin/mocha --reporter spec --require test/node/bootstrap test/*.test.js"
},
"engines": { "node": ">= 0.6.0" }
}
View
@@ -0,0 +1,10 @@
+var robots = require('index');
+
+
+describe('robots plugin', function() {
+
+ it('should export function', function() {
+ expect(robots).to.be.a('function');
+ });
+
+});
View
@@ -0,0 +1,3 @@
+var chai = require('chai');
+
+global.expect = chai.expect;

0 comments on commit b081a83

Please sign in to comment.