Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Mocha test framework

- Added in the Mocha test framework to npm
- Added in the test folder, and a basic pending test
- Added in a make file to run the tests via: make test
  • Loading branch information...
commit cc428910c76457d3a3bb61a0c7eb106e2137a108 1 parent 16069b9
@cbrammer cbrammer authored
View
3  initproject.sh
@@ -6,12 +6,15 @@ mkdir ./static/css
mkdir ./static/js
mkdir ./views
mkdir ./models
+mkdir ./test
echo "Copying Markup and CSS BoilerPlate..."
cp ./templates/app/server.js ./server.js
cp ./templates/app/package.json ./package.json
cp ./templates/app/.gitignore ./.gitignore
cp ./templates/app/config.json ./config.json
+cp ./templates/app/Makefile ./Makefile
+cp ./templates/test/stub.js ./test/stub.js
curl https://raw.github.com/h5bp/html5-boilerplate/master/css/style.css > ./static/css/style.css
cp ./templates/views/500.jade ./views/500.jade
cp ./templates/views/404.jade ./views/404.jade
View
10 templates/app/Makefile
@@ -0,0 +1,10 @@
+TESTS = test/*.js
+
+test:
+ @NODE_ENV=test ./node_modules/.bin/mocha \
+ --require should \
+ --reporter list \
+ --slow 20 \
+ --growl \
+ $(TESTS)
+.PHONY: test
View
4 templates/app/package.json
@@ -11,7 +11,9 @@
"socket.io": "0.8.7"
},
"devDependencies": {
- "vows": "0.5.x"
+ "vows": "0.5.x",
+ "mocha": "*",
+ "should": "*"
},
"engine": "node >= 0.6.6"
}
View
7 templates/test/stub.js
@@ -0,0 +1,7 @@
+describe('stub', function(){
+
+ describe('#test', function(){
+ it('should have some units tests')
+ })
+
+})
Please sign in to comment.
Something went wrong with that request. Please try again.