FAQ Database Discussion Community


Karma exits with code 1 when it doesnt execute any spec tests

karma-runner,karma-jasmine,gulp-karma
Karma test runs fine but exits with code 1 if 0 of 0 tests are run. Does anyone know how to return exit code 0 and normally exit in this case? Using gulp-karma which fails the task when no specs are run.

ES6 - how to test Jasime tests thru karma using ES6 like 'import' statement

jasmine,karma-runner,browserify,traceur,gulp-karma
I am new to javascript, trying to write a spec having an ES6 like import statement and then execute it thru Karma with pre-processors as traceur and browserify (to bundle and provide 'require' method). It continues to give me an error of invalid syntax and on looking at the specs...

Gulp task not accessing karma.conf.js file

javascript,node.js,gulp,karma-runner,gulp-karma
I am using following gulp task to execute the karma/jasmine unit test cases . however i was not able access the karma.conf.js file for some reason. this problem occurs when i use this pathpackage to access the karma.conf.js file. gulp task gulp.task('tdd', function (done) { karma.start({ configFile: fs.readFile(path.join(__dirname, '../Tests/karma.conf.js')), singleRun:...

How do i go to parent directory when using __dirname?

javascript,node.js,directory,gulp,gulp-karma
Directory structure : WebApiRole GulpFile.js test Karma.conf.js Gulp code from GulpFile.js gulp.task('test', function (done) { karma.start({ configFile: _configFile: __dirname + '\\..\\test\\karma.conf.js', singleRun: true }, done); }); So my problem going to the parent directory and access the karma.conf.js . For some reason the path is not get resolved with ..\\...