mercredi 28 janvier 2015

Specifying dependencies with gulp-jasmine

I have the following gulpfile.js:



var gulp = require('gulp'),
jasmine = require('gulp-jasmine');

gulp.task('default', function () {
return gulp
.src('spec/test.js')
.pipe(jasmine());
});


The code inside spec/test.js uses a global angular variable, however, and throws an error about it being undefined when I run gulp task default. Let's say angular is defined in file spec/lib.js, in global scope.


How do I tell jasmine() what dependencies it needs to load first into the global scope before running the describe()s inside test.js? In other words, how do I tell jasmine() to load spec/lib.js first, before it runs the tests?


Aucun commentaire:

Enregistrer un commentaire