-
-
Notifications
You must be signed in to change notification settings - Fork 40
Closed
Description
Hi!
I got this error, seems to be relate to Node 6 release.
TypeError: Path must be a string. Received undefined
at assertPath (path.js:7:11)
at Object.join (path.js:466:7)
at ~~~\node_modules\jasmine\lib\jasmine.js:93:38
at Array.forEach (native)
at Jasmine.loadConfig (~~~\node_modules\jasmine\lib\jasmine.js:92:20)
at module.exports (~~~\node_modules\gulp-jasmine\index.js:36:11)
at Gulp.gulp.task (~~~\gulpfile.js:26:7)
at module.exports (~~~\node_modules\orchestrator\lib\runTask.js:34:7)
at Gulp.Orchestrator._runTask (~~~\node_modules\orchestrator\index.js:273:3)
at Gulp.Orchestrator._runStep (~~~\node_modules\orchestrator\index.js:214:10)Here is my gulpfile.js
const gulp = require('gulp');
const jasmine = require('gulp-jasmine');
const paths = {
scripts: ['./server/**/*.js'],
specs: ['./server/**/*[Ss]pec.js']
}
var jasmineConfig = {
"spec_files": [
"**/*[sS]pec.js"
],
"helpers": [
"spec/helpers/**/*.js"
],
"stopSpecOnExpectationFailure": false,
"random": false
}
gulp.task('test', () => {
gulp
.src(paths.specs)
.pipe(
jasmine({
config: jasmineConfig
})
);
});
gulp.task('default', [
'test',
'watch'
]);
gulp.task('watch', () => {
gulp.watch(paths.scripts, ['test']);
});I try already with
var jasmineConfig = require('./spec/support/jasmine.json');
Or even inline with no declare variable, but it doesn't work, however the configuration gets loaded, it show that error. If no configuration gets loaded, it shows nothing.
EDIT: I fixed. I was missing the "spec_dir" for the configuration. Thanks!
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels