我已经配置了我的qunit任务,如下所示:
// Unit Test Configuration
qunit: {
ac: {
files: ['test/**/*.html']
}
}
grunt.registerTask('ac', ['jshint:ac', 'qunit:ac']);jsHint运行得很好。但在使用qunit时,我得到了错误:
运行"qunit:ac“(qunit)任务警告:无法使用”in“运算符搜索”src“
发布于 2013-05-15 07:21:42
将files: ['test/**/*.html']更改为src: ['test/**/*.html']。files属性用于多个src/dest配对。请参阅http://gruntjs.com/configuring-tasks#files-object-format
例如:
qunit: {
ac: {
files: [{
src: ['test/**/*.html']
}, {
src: ['test2/**/*.html']
}]
}
}如果你只想要test/**/*.html,一个更简单的配置是:
qunit: {
ac: ['test/**/*.html']
}https://stackoverflow.com/questions/16538884
复制相似问题