2016-07-18 5 views
0

つぶやきをインストールしてセットアップしました。それは私がつぶやきを入力すると実行されます。しかし、以下のエラーが発生しています。つぶれたエラーメッセージ

以下のコードを見てください。 ":ファイルqunit"(qunit)タスク警告:続行するには0/0アサーションは(は0ms)を走った 使用--forceを実行

警告のために中断されました。

gruntfile.js:

/*global module:false*/ 
module.exports = function(grunt) { 

    // Project configuration. 
    grunt.initConfig({ 
    // Metadata. 
    pkg: grunt.file.readJSON('package.json'), 
    banner: '/*! <%= pkg.title || pkg.name %> - v<%= pkg.version %> - ' + 
     '<%= grunt.template.today("yyyy-mm-dd") %>\n' + 
     '<%= pkg.homepage ? "* " + pkg.homepage + "\\n" : "" %>' + 
     '* Copyright (c) <%= grunt.template.today("yyyy") %> <%= pkg.author.name %>;' + 
     ' Licensed <%= _.pluck(pkg.licenses, "type").join(", ") %> */\n', 
    // Task configuration. 
    concat: { 
     options: { 
     banner: '<%= banner %>', 
     stripBanners: true, 
     separator: ';' 
     }, 
     dist: { 
     src: [ 
      'js/**/*.js' 
     ], 
     dest: 'dist/<%= pkg.name %>.js' 
     } 
    }, 
    uglify: { 
     options: { 
     banner: '<%= banner %>' 
     }, 
     dist: { 
     src: '<%= concat.dist.dest %>', 
     dest: 'dist/<%= pkg.name %>.min.js' 
     } 
    }, 
    jshint: { 
     options: { 
     curly: true, 
     eqeqeq: true, 
     immed: true, 
     latedef: true, 
     newcap: true, 
     noarg: true, 
     sub: true, 
     undef: true, 
     unused: true, 
     boss: true, 
     eqnull: true, 
     browser: true, 
     globals: { 
      "$": false, 
      "test": false, 
      "assert": false 
     } 
     }, 
     gruntfile: { 
     src: 'gruntfile.js' 
     }, 
     lib_test: { 
     src: ['js/**/*.js', 'test/**/*.js'] 
     } 
    }, 
    qunit: { 
     files: ['test/**/*.html'] 
    }, 
    watch: { 
     gruntfile: { 
     files: '<%= jshint.gruntfile.src %>', 
     tasks: ['jshint:gruntfile'] 
     }, 
     lib_test: { 
     files: '<%= jshint.lib_test.src %>', 
     tasks: ['jshint:lib_test', 'qunit'] 
     } 
    } 
    }); 

    // These plugins provide necessary tasks. 
    grunt.loadNpmTasks('grunt-contrib-concat'); 
    grunt.loadNpmTasks('grunt-contrib-uglify'); 
    grunt.loadNpmTasks('grunt-contrib-qunit'); 
    grunt.loadNpmTasks('grunt-contrib-jshint'); 
    grunt.loadNpmTasks('grunt-contrib-watch'); 

    // Default task. 
    grunt.registerTask('default', ['jshint', 'qunit', 'concat', 'uglify']); 

}; 

package.json:

{ 
    "engines": { 
    "node": ">= 0.10.0" 
    }, 
    "devDependencies": { 
    "grunt": "~0.4.5", 
    "grunt-contrib-jshint": "~0.10.0", 
    "grunt-contrib-watch": "~0.6.1", 
    "grunt-contrib-qunit": "~0.5.2", 
    "grunt-contrib-concat": "~0.4.0", 
    "grunt-contrib-uglify": "~0.5.0" 
    } 
} 

答えて

1

このエラーはqunitからであり、あなたがゼロのアサーションを使用してテストを実行しようとしたと言っていますqunitは失敗とみなします。 'default'タスクから'qunit'を削除すると、gruntが実行されます。 でjshintを実行したい場合は、gruntの代わりにgrunt jshintをコマンドラインから実行できます。

関連する問題