gulp-karma

Uncaught Error: Module name “lib/chai” has not been loaded yet for context: use require([])

倾然丶 夕夏残阳落幕 提交于 2019-12-13 02:46:58
问题 i m using karma-mocha ..my karma.conf file is working with karma-jasmine...but not working with karma-mocha....my karma.conf file:-- module.exports = function(config){ config.set({ basePath : '../app', preprocessors: { '**/*.html':'ng-html2js' }, ngHtml2JsPreprocessor: { prependPrefix: '/' }, files : [ 'node_modules/jquery/**/*.js', 'lib/angular/angular.js', 'lib/angular/angular-*.js', '../test/lib/angular-mocks.js', '../test/lib/sinon-1.15.0.js', '../test/chai/chai.js', 'js/**/*.js', '..

How do i go to parent directory when using __dirname?

蹲街弑〆低调 提交于 2019-12-07 05:30:10
问题 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 ..\\ to go back to the parent directory of WebApiRole . can someone point me in the right direction ? 回答1: I had to use path package to

gulp task can't find karma.conf.js

ε祈祈猫儿з 提交于 2019-12-06 21:30:02
问题 I am trying to run karma test via a gulp task. I use https://github.com/karma-runner/gulp-karma and for some reason gulp cannot locate my karma.conf.js. That file is located in the same folder as the gulpfile. The root of the project. No matter what path I put, I get the same error File ./karma.conf.js does not exist. I cannot figure out how to path it correctly. Here is the code for the gulp task. gulp.task('tdd', function (done) { new Server({ configFile: 'karma.conf.js' }, done).start(); }

How do i go to parent directory when using __dirname?

喜欢而已 提交于 2019-12-05 10:51:11
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 ..\\ to go back to the parent directory of WebApiRole . can someone point me in the right direction ? I had to use path package to resolve this issue . var path = require("path"), fs = require("fs"); gulp.task('test', function (done) {

gulp task can't find karma.conf.js

好久不见. 提交于 2019-12-05 02:16:34
I am trying to run karma test via a gulp task. I use https://github.com/karma-runner/gulp-karma and for some reason gulp cannot locate my karma.conf.js. That file is located in the same folder as the gulpfile. The root of the project. No matter what path I put, I get the same error File ./karma.conf.js does not exist. I cannot figure out how to path it correctly. Here is the code for the gulp task. gulp.task('tdd', function (done) { new Server({ configFile: 'karma.conf.js' }, done).start(); }); This is how I spool up karma using Gulp ( and both files are in the same root ). var karma = require