phantomjs - Running karma test using gulp on visual studio Continuous integration(TFS) issue -


running gulp task test karma works fine in local machine using visual studio task runner explorer or using command prompt if fails during continuous integration.

here task in gulp.

gulp.task('run-test', function (done) {      server.start({         configfile: __dirname + '/karma.conf.js',         singlerun: true       }, function (result) {       if (result > 0) {         return done(new error(`karma exited status code ${result}`));       }         done();     }); }); 

below error getting.

starting: gulp run-test **************************************************************************** c:\users\issblder\appdata\roaming\npm\gulp.cmd run-test --gulpfile  c:\ba\263\s\x.y\x.y.web\gulpfile.js using gulpfile c:\ba\263\s\x.y\x.y.web\gulpfile.js starting 'run-test'...   [33m05 04 2017 10:28:07.848:warn [proxy]: [39mproxy "/base/scripts/src/app" normalized "/base/scripts/src/app/"   [33m05 04 2017 10:28:09.051:warn [watcher]: [39mpattern "c:/ba/263/s/x.y/x.y.web/scripts/src/app/**/*.css" not match file.   [32m05 04 2017 10:28:10.707:info [karma]: [39mkarma v1.5.0 server started @ http://0.0.0.0:9876/   [32m05 04 2017 10:28:10.707:info [launcher]: [39mlaunching browser phantomjs unlimited concurrency   [32m05 04 2017 10:28:10.738:info [launcher]: [39mstarting browser phantomjs   [32m05 04 2017 10:28:14.399:info [phantomjs 2.1.1 (windows 8 0.0.0)]:    [39mconnected on socket llgpa-kbxnovtyhkaaaa id 95283473   [33m05 04 2017 10:28:14.500:warn [web-server]: [39m404: /base/node_modules/systemjs/dist/system-polyfills.js phantomjs 2.1.1 (windows 8 0.0.0): executed 0 of 0 success (0 secs / 0 secs) [1a[2kphantomjs 2.1.1 (windows 8 0.0.0): executed 0 of 0 error (0 secs / 0 secs) 'run-test' errored after 7.41 s error: karma exited status code 1   @ c:\ba\263\s\x.y\x.y.web\gulpfile.js:33:25   @ removealllisteners (c:\ba\263\s\x.y\x.y.web\node_modules\karma\lib\server.js:380:7)   @ server.<anonymous> (c:\ba\263\s\x.y\x.y.web\node_modules\karma\lib\server.js:391:9)   @ server.g (events.js:260:16)   @ emitnone (events.js:72:20)   @ server.emit (events.js:166:7)   @ emitclosent (net.js:1521:8)   @ nexttickcallbackwith1arg (node.js:431:9)   @ process._tickcallback (node.js:353:17)  gulp failed error: c:\users\issblder\appdata\roaming\npm\gulp.cmd failed return code: 1  **************************************************************************** finishing: gulp run-test. 

i using these dev dependencies

"devdependencies": {     "@types/jasmine": "^2.5.46",     "concurrently": "^3.1.0",     "del": "^2.2.0",     "gulp": "^3.8.8",     "gulp-babel": "^6.1.2",     "gulp-concat": "^2.6.1",     "gulp-delete-lines": "^0.0.7",     "gulp-inject-string": "^1.1.0",     "gulp-ngc": "^0.1.2",     "gulp-size": "^2.1.0",     "gulp-sourcemaps": "^1.9.1",     "gulp-tslint": "^7.0.1",     "gulp-typescript": "^3.1.3",     "gulp-uglify": "^2.0.0",     "gulp-util": "^3.0.8",     "jasmine-core": "^2.5.2",     "karma": "^1.5.0",     "karma-chrome-launcher": "^2.0.0",     "karma-cli": "^1.0.1",     "karma-jasmine": "^1.1.0",     "karma-junit-reporter": "^1.2.0",     "karma-phantomjs-launcher": "^1.0.4",     "karma-xml-reporter": "^0.1.4",     "lite-server": "^2.2.2",     "phantomjs": "^2.1.7",     "rollup": "^0.41.4",     "rollup-plugin-commonjs": "^7.0.0",     "rollup-plugin-node-resolve": "^2.0.0",     "rollup-plugin-uglify": "^1.0.1",     "rollup-stream": "^1.19.0",     "run-sequence": "^1.2.2",     "ts-node": "^1.7.2",     "tslint": "^4.0.2",     "typescript": "^2.1.4",     "typings": "^2.0.0",     "vinyl-source-stream": "^1.1.0" }, 


Comments