Tests boilerplate

This commit is contained in:
Clément GOUIN
2019-06-19 11:36:56 +02:00
parent 559ea661b3
commit fe5e082e6a
8 changed files with 21 additions and 7 deletions
-3
View File
@@ -15,9 +15,6 @@
"varstmt": true,
"sub": true,
"quotmark": "single",
"browser": true,
"jquery": true,
"devel": true,
"node": true,
"globals": {
}
+1 -1
View File
@@ -57,7 +57,7 @@ then edit the config.json file with your values :
```bash
npm start
#or
node server.js
node src/server.js
```
You might want to use something like screen to separate the process from your current terminal session.
+2 -2
View File
@@ -2,7 +2,7 @@
"name": "gitblog.md",
"version": "1.0.0",
"description": "A static blog using Markdown pulled from your git repository.",
"main": "server.js",
"main": "src/server.js",
"dependencies": {
"express": "^4.17.1",
"ncp": "^2.0.0",
@@ -19,7 +19,7 @@
},
"scripts": {
"test": "jest",
"install": "postinstall.js"
"install": "src/postinstall.js"
},
"repository": {
"type": "git",
View File
+1 -1
View File
@@ -1,4 +1,4 @@
const config = require('./config.json');
const config = require('../config.json');
const app = require('./app')(config);
const port = config.nodePort|3000;
+14
View File
@@ -0,0 +1,14 @@
/* jshint -W117 */
const request = require('supertest');
const config = require('./config.test.json');
const app = require('../src/app')(config);
describe('Test root path', () => {
test('GET / 200', done => {
request(app).get('/').then(response => {
expect(response.statusCode).toBe(200);
done();
});
});
});
+3
View File
@@ -0,0 +1,3 @@
{
}