grunt-template-jasmine-requirejs icon indicating copy to clipboard operation
grunt-template-jasmine-requirejs copied to clipboard

PhantomJS timed out

Open georgezhang opened this issue 8 years ago • 2 comments

Error:

Running "jasmine:taskName" (jasmine) task Testing Jasmine specs via PhantomJS Warning: PhantomJS timed out, possibly due to an unfinished async spec. Use --force to continue.

Gruntfile.js

#```javascript module.exports = function(grunt) {

// Example configuration using a single requireJS config file grunt.initConfig({ jasmine: { taskName: { src: 'src/*.js', options: { specs: 'spec/*Spec.js', //helpers: 'spec/*Helper.js', template: require('grunt-template-jasmine-requirejs'), templateOptions: { //requireConfigFile: 'src/main.js' } } } } });

grunt.loadNpmTasks('grunt-contrib-jasmine');

// Default task(s).
grunt.registerTask('test', ['jasmine:taskName']); //'jasmine:global',

};



package.json

  "devDependencies": {
    "grunt": "*",
    "grunt-contrib-jasmine": "^1.1.0",
    "grunt-contrib-uglify": "*",
    "grunt-contrib-watch": "*",
    "grunt-template-jasmine-requirejs": "^0.2.3",
    "grunt-umd": "*"
  }

georgezhang avatar Jan 25 '17 22:01 georgezhang

May be related to https://github.com/gruntjs/grunt-contrib-jasmine/issues/255.

jgonggrijp avatar Feb 14 '17 12:02 jgonggrijp

I was seeing this issue. The solution was not really PhantomJS-related, it was more related to the fact that the _SpecRunner.html file was not generated correctly. I was using a later version of lodash, which resulted in https://github.com/cloudchen/grunt-template-jasmine-requirejs/blob/master/src/template-jasmine-requirejs.js#L176 returning a function, rather than the results of a function invocation.

See https://github.com/cloudchen/grunt-template-jasmine-requirejs/issues/88 and https://github.com/cloudchen/grunt-template-jasmine-requirejs/pull/89 for the solution. I wound up forking this repo and pulling in various changes to get it working for me. YMMV.

For what it's worth, it doesn't really look like this git repo is being actively maintained. Perhaps it's time for someone to fork it and take it over.

wpwood avatar Sep 07 '17 15:09 wpwood