maenu / grunt-template-jasmine-istanbul-example

Example application using grunt-istanbul and grunt-contrib-jasmine
MIT License
21 stars 8 forks source link

Grunt 0.4.0rc5 compatibility? #1

Closed ninjascience closed 11 years ago

ninjascience commented 11 years ago

I'm running Grunt 0.4.0rc5. When I try and run this example I get:

Initializing Command-line options: --verbose

Reading "Gruntfile.js" Gruntfile...OK

Registering Gruntfile tasks. Reading package.json...OK Parsing package.json...OK Initializing config...OK

Registering "grunt-istanbul" local Npm module tasks. Reading /Users/rmiller/projects/example-grunt-jasmine-istanbul/node_modules/grunt-istanbul/package.json...OK Parsing /Users/rmiller/projects/example-grunt-jasmine-istanbul/node_modules/grunt-istanbul/package.json...OK Loading "helpers.js" tasks...OK

No tasks were registered or unregistered. Loading "istanbul.js" tasks...OK

  • instrument, makeReport, reloadTasks, storeCoverage

Registering "grunt-contrib-jasmine" local Npm module tasks. Reading /Users/rmiller/projects/example-grunt-jasmine-istanbul/node_modules/grunt-contrib-jasmine/package.json...OK Parsing /Users/rmiller/projects/example-grunt-jasmine-istanbul/node_modules/grunt-contrib-jasmine/package.json...OK Loading "jasmine.js" tasks...ERROR

TypeError: Object # has no method 'expandFiles' at /Users/rmiller/projects/example-grunt-jasmine-istanbul/node_modules/grunt-contrib-jasmine/tasks/lib/jasmine.js:60:51 at Array.forEach (native) at Object.getRelativeFileList (/Users/rmiller/projects/example-grunt-jasmine-istanbul/node_modules/grunt-contrib-jasmine/tasks/lib/jasmine.js:59:8) at Object.module.exports (/Users/rmiller/projects/example-grunt-jasmine-istanbul/node_modules/grunt-contrib-jasmine/tasks/jasmine.js:40:27) at loadTask (/Users/rmiller/projects/example-grunt-jasmine-istanbul/node_modules/grunt/lib/grunt/task.js:312:10) at /Users/rmiller/projects/example-grunt-jasmine-istanbul/node_modules/grunt/lib/grunt/task.js:348:7 at Array.forEach (native) at loadTasks (/Users/rmiller/projects/example-grunt-jasmine-istanbul/node_modules/grunt/lib/grunt/task.js:347:11) at Task.task.loadNpmTasks (/Users/rmiller/projects/example-grunt-jasmine-istanbul/node_modules/grunt/lib/grunt/task.js:395:5) at Object.module.exports (/Users/rmiller/projects/example-grunt-jasmine-istanbul/Gruntfile.js:42:8) Loading "Gruntfile.js" tasks...OK

  • coverage, test

Running tasks: coverage

Running "coverage" task Warning: Task "jasmine:coverage" not found. Use --force to continue.

Aborted due to warnings.

maenu commented 11 years ago

Seems like the jasmine and istanbul tasks make use of expandFiles, which was dropped in grunt 0.4.0rc5, see https://github.com/gruntjs/grunt-contrib-jasmine/issues/17. jasmine is up to date on version 0.3.0.rc5, but not grunt-istanbul. I forked and will have a look at it.

ninjascience commented 11 years ago

I just found that myself, thanks. I changed two uses of expandFiles to expand in instanbul.js and it works. I was going to fork and fix but it sounds like you don't need it?

maenu commented 11 years ago

If you have a running version of the istanbul please fork it and fix, mine doesn't work yet. The best would be to make a pull request at grunt-istanbul. I'll update the package.json once your fix is pushed.

maenu commented 11 years ago

Thanks a lot. The grunt-istanbul dep now points to your fork, until your pull request is merged.