Ragnarsson
Ragnarsson

Reputation: 1825

Grunt Qunit exclude file(s)

I have configured the qunit task like this:

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

Is it possible if I want to exclude one (or two) particular html file?. I want to do something like this:

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

I read documentation of qunit, but didn't see something like this. Is there a way? Thanks

Upvotes: 0

Views: 104

Answers (1)

Jordan Kasper
Jordan Kasper

Reputation: 13273

The QUnit grunt task uses the same globbing pattern matcher as most other tasks. Therefore, you can simply add a negated pattern to your target array of URLs:

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

Upvotes: 2

Related Questions