lazd / gulp-karma

Karma plugin for gulp
MIT License
75 stars 36 forks source link

TypeError: 'null' is not an object (evaluating 'currentSpec.expect') #30

Closed danielbsig closed 10 years ago

danielbsig commented 10 years ago

The following error occurs occasionally (not always) when we run our tests using gulp-karma. However, if the tests are executed using karma alone, this does not occur.

Seems to be a problem on Windows only.

Any ideas what might be the problem?

lazd commented 10 years ago

currentSpec.expect is part of of Jasmine, so this could be a problem with your Karma plugin configuration or Jasmine itself... It is odd that the behavior is only observed when running with gulp-karma, but I can't think of a reason why that could ever happen due to what gulp-karma does.

nordfjord commented 10 years ago

it might have something to do with the gulp.src we're passing. Is it possible to use the file array defined in karma.conf.js?

lazd commented 10 years ago

The plugin is in flux right now and will definitely not be using gulp.src() to specify files in the future. See https://github.com/karma-runner/karma/issues/1037, where @pkozlowski-opensource and I discuss that this plugin really shouldn't exist, we just need a few features in Karma to make it usable directly from gulp.

danielbsig commented 10 years ago

The problem is probably in some other component (karma-jasmine or jasmine itself), so I will close this issue.