1

I'm kind of new to grunt and jasmine, so I hope i'm not wasting your time. I'm getting this error when trying to run more than 29 tests:

Warning: PhantomJS failed to load your page. Use --force to continue.

Aborted due to warnings.

Process finished with exit code 90

It doesn't matter which tests I comment out, as long as there are less than 30 test, I will not receive this warning.
All my tests pass, so I don't think it's something to do with them.

My (simplified) gruntfile:

module.exports = function (grunt) {

    // Load grunt tasks automatically
    require('load-grunt-tasks')(grunt);

    // Time how long tasks take. Can help when optimizing build times
    require('time-grunt')(grunt);

    // Define the configuration for all the tasks
    grunt.initConfig({
        connect: {
            options: {
                port: 9000,
                // Change this to '0.0.0.0' to access the server from   outside.
                hostname: 'localhost',
                livereload: 35729
            },
            livereload: {
                options: {
                    open: true,
                    base: [
                        '.tmp',
                        '<%= yeoman.app %>'
                    ]
                }
            },
        }

        jasmine: {
            pivotal: {
                src: ['/scripts/*.js'],
                options: {
                    specs: 'tests/**/*Spec.js',
                    helpers: 'tests/**/*Helper.js',
                    summary: true
                }
            }
        }
    });

    grunt.registerTask('unit-tests', [
        'jasmine'
    ]);
}

I'm using:
grunt-cli v0.1.13
grunt v0.4.5
and
grunt-contrib-jasmine ^0.9.0

I'd be happy to add more information if needed. Thanks

Clarification
I mean there are 29 it(...) clauses (not expect(...)'s)

Update 1
When running with the --debug flag, I see that the last log is this (This does not appear when running less than 30 specs):

[D] ["phantomjs","onResourceReceived",{"contentType":"image/svg+xml","headers":[{"name":"Content-Type","value":"image/svg+xml"},{"name":"Content-Length","value":"8834"}],"id":68,"redirectURL":null,"stage":"end","status":null,"statusText":null,"time":"2016-01-11T10:06:46.813Z","url":"data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj..."}]

I didn't put the whole base64 representation of the image file, because it is big.
And when I opened the file in the browser I saw that it is the Jasmine logo.

Update 2
I noticed it doesn't happen when I run it on a different computer (our Jenkins server)

jonny bordo
  • 549
  • 3
  • 7
  • 17

0 Answers0