Started implementing test structure

This commit is contained in:
Alicia Sykes
2015-08-03 17:35:32 +01:00
parent 8edcebd0ce
commit fb638812d6
5 changed files with 30 additions and 2 deletions

1
.gitignore vendored
View File

@@ -2,5 +2,6 @@ node_modules
bower_components
.idea
*.idea
test/logs
.log
*.log

View File

@@ -5,7 +5,8 @@
"version": "0.0.0",
"private": true,
"scripts": {
"start": "node ./bin/www"
"start": "node ./bin/www",
"test": "mocha"
},
"main": "app.js",
"repository": {
@@ -17,6 +18,7 @@
},
"dependencies": {
"body-parser": "~1.12.0",
"coffee-script": "^1.9.3",
"cookie-parser": "~1.3.4",
"debug": "~2.1.1",
"express": "~4.12.2",
@@ -26,6 +28,7 @@
},
"devDependencies": {
"browser-sync": "^2.8.2",
"chai": "^3.2.0",
"del": "^1.2.0",
"event-stream": "^3.3.1",
"gulp": "^3.9.0",
@@ -43,7 +46,13 @@
"gulp-uglify": "^1.2.0",
"gulp-uncss": "^1.0.2",
"gulp-util": "^3.0.6",
"jshint-stylish": "^2.0.1"
"istanbul": "^0.3.17",
"jshint-stylish": "^2.0.1",
"karma": "^0.13.3",
"mocha": "^2.2.5",
"phantom": "^0.7.2",
"sinon": "^1.15.4",
"supertest": "^1.0.1"
},
"license": "MIT"
}

9
test/example.coffee Normal file
View File

@@ -0,0 +1,9 @@
chai = require 'chai'
expect = chai.expect
## Should just pass by default, it's a test test
describe 'Coffee example test', ->
it 'should return true in CoffeeScript', ->
expect(true).equal true
return
return

8
test/general.js Normal file
View File

@@ -0,0 +1,8 @@
var chai = require('chai');
var expect = chai.expect;
describe('JavaScript example test', function(){
it('should return true in JavaScript',function(){
expect(true).equal(true);
});
});

1
test/mocha.opts Normal file
View File

@@ -0,0 +1 @@
--compilers coffee:coffee-script/register