Javascript grunt模板jasmine istanbul未生成覆盖率报告

Javascript grunt模板jasmine istanbul未生成覆盖率报告,javascript,gruntjs,istanbul,grunt-contrib-requirejs,grunt-contrib-jasmine,Javascript,Gruntjs,Istanbul,Grunt Contrib Requirejs,Grunt Contrib Jasmine,Im使用grunt模板jasmine istanbul和grunt模板jasmine requirejs。当我运行测试覆盖率模块时,我的所有测试用例都成功运行,但没有生成覆盖率 jasmine: { coverage: { src: [...], options: { specs: '...', vendors: [...], t

Im使用grunt模板jasmine istanbul和grunt模板jasmine requirejs。当我运行测试覆盖率模块时,我的所有测试用例都成功运行,但没有生成覆盖率

jasmine: {
            coverage: {
            src: [...],
            options: {
                specs: '...',
                vendors: [...],
                template: require('grunt-template-jasmine-istanbul'),
                templateOptions: {
                    coverage: 'bin/coverage/coverage.json',
                    report: 'bin/coverage',
                    template: require('grunt-template-jasmine-requirejs'),
                    templateOptions: {
                        requireConfig: {
                            baseUrl: '...',
                        }
                    }
                }
            }
          }
        }

我们在设置中遇到了确切的问题。。问题只是因为src路径中的路径不正确。因此,请确保已正确配置路径

下面是为我们工作的示例代码。问题应该正好出现在源路径配置中

jasmine : {
    coverage : {
        src : [
        'web/js/sad/service/common/model/**/*.js' ],
        options : {
            specs : [ 'tests/**/*.js' ],
            template : require('grunt-template-jasmine-istanbul'),
            vendor : [ '../3rdParty/extjs-4.1.0/*.js',
                    'web/js/common/controller/**/*.js' ],
            templateOptions : {
                coverage : 'bin/coverage/coverage.json',
                report : 'bin/coverage',
                thresholds : {
                    lines : 5,
                    statements : 5,
                    branches : 1,
                    functions : 1
                }
            }
        }
    }
}