Now when running tests we use a separate config file test.json
This commit is contained in:
17
seasoned_api/conf/test.json
Normal file
17
seasoned_api/conf/test.json
Normal file
@@ -0,0 +1,17 @@
|
|||||||
|
{
|
||||||
|
"database": {
|
||||||
|
"host": ":memory:"
|
||||||
|
},
|
||||||
|
"webserver": {
|
||||||
|
"port": 31400
|
||||||
|
},
|
||||||
|
"tmdb": {
|
||||||
|
"apiKey": "bogus-api-key"
|
||||||
|
},
|
||||||
|
"raven": {
|
||||||
|
"DSN": ""
|
||||||
|
},
|
||||||
|
"authentication": {
|
||||||
|
"secret": "secret"
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -3,16 +3,19 @@
|
|||||||
"main": "webserver/server.js",
|
"main": "webserver/server.js",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"start": "cross-env SEASONED_CONFIG=conf/development.json NODE_PATH=. node src/webserver/server.js",
|
"start": "cross-env SEASONED_CONFIG=conf/development.json NODE_PATH=. node src/webserver/server.js",
|
||||||
"test": "cross-env SEASONED_CONFIG=conf/development.json TESTING=true NODE_PATH=. mocha --recursive test/system",
|
"test": "cross-env SEASONED_CONFIG=conf/test.json NODE_PATH=. mocha --recursive test",
|
||||||
"coverage": "cross-env SEASONED_CONFIG=conf/test.json NODE_PATH=. istanbul cover -x script/autogenerate-documentation.js --include-all-sources --dir test/.coverage node_modules/mocha/bin/_mocha --recursive test/**/* -- --report lcovonly && cat test/.coverage/lcov.info | coveralls && rm -rf test/.coverage",
|
"coverage": "cross-env SEASONED_CONFIG=conf/test.json NODE_PATH=. istanbul cover -x script/autogenerate-documentation.js --include-all-sources --dir test/.coverage node_modules/mocha/bin/_mocha --recursive test/**/* -- --report lcovonly && cat test/.coverage/lcov.info | coveralls && rm -rf test/.coverage",
|
||||||
"lint": "./node_modules/.bin/eslint src/"
|
"lint": "./node_modules/.bin/eslint src/"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"bcrypt-nodejs": "^0.0.3",
|
"bcrypt-nodejs": "^0.0.3",
|
||||||
|
"blanket": "^1.2.3",
|
||||||
"body-parser": "~1.0.1",
|
"body-parser": "~1.0.1",
|
||||||
|
"codecov": "^3.0.0",
|
||||||
"cross-env": "^3.1.3",
|
"cross-env": "^3.1.3",
|
||||||
"express": "~4.11.0",
|
"express": "~4.11.0",
|
||||||
"jsonwebtoken": "^8.0.1",
|
"jsonwebtoken": "^8.0.1",
|
||||||
|
"mocha-lcov-reporter": "^1.3.0",
|
||||||
"mongoose": "^3.6.13",
|
"mongoose": "^3.6.13",
|
||||||
"moviedb": "^0.2.10",
|
"moviedb": "^0.2.10",
|
||||||
"node-cache": "^4.1.1",
|
"node-cache": "^4.1.1",
|
||||||
@@ -28,7 +31,7 @@
|
|||||||
"eslint-config-airbnb-base": "^12.1.0",
|
"eslint-config-airbnb-base": "^12.1.0",
|
||||||
"eslint-plugin-import": "^2.8.0",
|
"eslint-plugin-import": "^2.8.0",
|
||||||
"istanbul": "^0.4.5",
|
"istanbul": "^0.4.5",
|
||||||
"mocha": "^3.1.0",
|
"mocha": "^5.0.4",
|
||||||
"supertest": "^2.0.1",
|
"supertest": "^2.0.1",
|
||||||
"supertest-as-promised": "^4.0.1"
|
"supertest-as-promised": "^4.0.1"
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user