From 2ca6c30d94f675a75a57e8dc6c820ef6ff5bc3c7 Mon Sep 17 00:00:00 2001 From: Ravi Srinivasan <rsriniva@redhat.com> Date: Wed, 03 Jul 2019 15:10:36 +0200 Subject: [PATCH] Fixes after author test --- books/jenkins/Jenkinsfile | 1 - books/tests/app_test.js | 2 +- books/routes/authors.js | 1 + books/package.json | 2 +- 4 files changed, 3 insertions(+), 3 deletions(-) diff --git a/books/jenkins/Jenkinsfile b/books/jenkins/Jenkinsfile index 36e6be1..21a465f 100644 --- a/books/jenkins/Jenkinsfile +++ b/books/jenkins/Jenkinsfile @@ -38,7 +38,6 @@ steps { echo '### Running unit tests ###' sh 'cd books; npm test' - junit 'books/reports/server/mocha/test-results.xml' } } diff --git a/books/package.json b/books/package.json index e958a2c..a6452f8 100644 --- a/books/package.json +++ b/books/package.json @@ -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": { diff --git a/books/routes/authors.js b/books/routes/authors.js index e28dab7..f9a0c04 100644 --- a/books/routes/authors.js +++ b/books/routes/authors.js @@ -4,6 +4,7 @@ const authors = require('../data/authors'); +var user; /* GET users listing. */ router.get('/', (req, res) => { diff --git a/books/tests/app_test.js b/books/tests/app_test.js index 71062ab..62bff17 100644 --- a/books/tests/app_test.js +++ b/books/tests/app_test.js @@ -34,7 +34,7 @@ .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(); }); }); -- Gitblit v1.9.3