Gruntjs Grunt Qunit排除文件

Gruntjs Grunt Qunit排除文件,gruntjs,phantomjs,qunit,grunt-contrib-qunit,Gruntjs,Phantomjs,Qunit,Grunt Contrib Qunit,我已将qunit任务配置为: //For testing qunit: { all: ['Test/**/*.html'] }, //For testing qunit: { all: ['Test/**/*.html'], options: { exclude: ['Test/**/ToBeExcluded.html'] } }, 如果我想排除一个(或两个)特定的html文件,是否可能?。我想这样做: //For testing qunit

我已将qunit任务配置为:

//For testing
qunit: {
    all: ['Test/**/*.html']
},
//For testing
qunit: {
    all: ['Test/**/*.html'],
    options: {
         exclude: ['Test/**/ToBeExcluded.html']
    }
},
如果我想排除一个(或两个)特定的html文件,是否可能?。我想这样做:

//For testing
qunit: {
    all: ['Test/**/*.html']
},
//For testing
qunit: {
    all: ['Test/**/*.html'],
    options: {
         exclude: ['Test/**/ToBeExcluded.html']
    }
},

我阅读了qunit的文档,但没有看到类似的内容。有办法吗?谢谢

QUnit grunt任务与大多数其他任务使用相同的匹配器。因此,您可以简单地向URL的目标数组添加一个否定模式:

qunit: {
    all: ['Test/**/*.html', '!Test/**/ToBeExcluded.html']
}

伟大的非常感谢,这是我需要的。