Fixes after author test
This commit is contained in:
1
books/jenkins/Jenkinsfile
vendored
1
books/jenkins/Jenkinsfile
vendored
@@ -38,7 +38,6 @@ pipeline {
|
||||
steps {
|
||||
echo '### Running unit tests ###'
|
||||
sh 'cd books; npm test'
|
||||
junit 'books/reports/server/mocha/test-results.xml'
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
"private": true,
|
||||
"scripts": {
|
||||
"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"
|
||||
},
|
||||
"dependencies": {
|
||||
|
||||
@@ -4,6 +4,7 @@ const router = express.Router();
|
||||
|
||||
const authors = require('../data/authors');
|
||||
|
||||
var user;
|
||||
|
||||
/* GET users listing. */
|
||||
router.get('/', (req, res) => {
|
||||
|
||||
@@ -34,7 +34,7 @@ describe('Books App routes test', () => {
|
||||
.get('/authors')
|
||||
.end((err, res) => {
|
||||
expect(res).to.have.status(200);
|
||||
expect(res.text).to.include('James Joyce');
|
||||
expect(res.text).to.include('James_Joyce');
|
||||
done();
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user