Fixes after author test
This commit is contained in:
parent
835453322f
commit
2ca6c30d94
4 changed files with 3 additions and 3 deletions
1
books/jenkins/Jenkinsfile
vendored
1
books/jenkins/Jenkinsfile
vendored
|
|
@ -38,7 +38,6 @@ pipeline {
|
||||||
steps {
|
steps {
|
||||||
echo '### Running unit tests ###'
|
echo '### Running unit tests ###'
|
||||||
sh 'cd books; npm test'
|
sh 'cd books; npm test'
|
||||||
junit 'books/reports/server/mocha/test-results.xml'
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -4,7 +4,7 @@
|
||||||
"private": true,
|
"private": true,
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"start": "node ./exec/www",
|
"start": "node ./exec/www",
|
||||||
"test": "export MOCHA_FILE='reports/server/mocha/test-results.xml' && IP=0.0.0.0 PORT=3030 node_modules/.bin/nyc --reporter=text node_modules/.bin/mocha tests/*_test.js -R mocha-junit-reporter",
|
"test": "IP=0.0.0.0 PORT=3030 node_modules/.bin/mocha tests/*_test.js",
|
||||||
"lint": "node_modules/.bin/eslint . --ext .js"
|
"lint": "node_modules/.bin/eslint . --ext .js"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
|
|
|
||||||
|
|
@ -4,6 +4,7 @@ const router = express.Router();
|
||||||
|
|
||||||
const authors = require('../data/authors');
|
const authors = require('../data/authors');
|
||||||
|
|
||||||
|
var user;
|
||||||
|
|
||||||
/* GET users listing. */
|
/* GET users listing. */
|
||||||
router.get('/', (req, res) => {
|
router.get('/', (req, res) => {
|
||||||
|
|
|
||||||
|
|
@ -34,7 +34,7 @@ describe('Books App routes test', () => {
|
||||||
.get('/authors')
|
.get('/authors')
|
||||||
.end((err, res) => {
|
.end((err, res) => {
|
||||||
expect(res).to.have.status(200);
|
expect(res).to.have.status(200);
|
||||||
expect(res.text).to.include('James Joyce');
|
expect(res.text).to.include('James_Joyce');
|
||||||
done();
|
done();
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue