diff --git a/Jenkinsfile b/Jenkinsfile index 3b7353d..e788608 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -5,16 +5,30 @@ pipeline { } } - stages { + stages { stage('wellcome') { steps { sh 'echo "wellcome to dojo !"' } } + stage('install') { + steps { + bat 'npm install' + } + } + stage('test') { + steps { + sh 'npm run test-jenkins' + } + } + stage('report') { + steps { + junit 'jenkins-test-results.xml' + } + } } environment { npm_config_cache = 'npm-cache' HOME = '.' - } -} +} \ No newline at end of file diff --git a/config/config.js b/config/config.js index 3adc115..ab0ed75 100644 --- a/config/config.js +++ b/config/config.js @@ -1,5 +1,5 @@ module.exports = { - username: "user no name", + username: "spooky", log: { host: "211.72.239.243", port: "24224", diff --git a/test/unit/index.test.js b/test/unit/index.test.js index 4a32edc..4e91a5d 100644 --- a/test/unit/index.test.js +++ b/test/unit/index.test.js @@ -15,7 +15,7 @@ describe('unit test', function () { it('display your name', function () { var config = require('./../../config/config'); - expect(config.username).to.be.equal("yourname"); + expect(config.username).to.be.equal("spooky"); require("../../dojo/dojo_start"); });