grunt-contrib-jasmine会限制测试次数吗?

时间:2016-01-06 19:19:37

标签: javascript node.js gruntjs grunt-contrib-jasmine

我对咕噜茉莉很新,所以我希望我不浪费你的时间。 我在尝试运行超过29次测试时遇到此错误:

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

Aborted due to warnings.

Process finished with exit code 90

我评论哪些测试并不重要,只要测试少于30次,我就不会收到此警告。
我的所有测试都通过了,所以我认为这与他们无关。

我的(简化)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'
    ]);
}

我正在使用:
grunt-cli v0.1.13
咕噜v0.4.5

grunt-contrib-jasmine ^ 0.9.0

如果需要,我很乐意添加更多信息。 感谢

澄清
我的意思是有29个it(...)条款(不是expect(...)

更新1
当使用--debug标志运行时,我看到最后一个日志是这个(运行少于30个规格时不会出现):

[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..."}]

我没有放置图像文件的整个base64表示,因为它是
当我在浏览器中打开文件时,我发现它是Jasmine徽标。

更新2
我注意到当我在另一台计算机(我们的Jenkins服务器)上运行它时不会发生这种情况

0 个答案:

没有答案