Using Karma, how do I exclude all files that match a pattern except for those within a specific sub-folder? Using Karma, how do I exclude all files that match a pattern except for those within a specific sub-folder? angularjs angularjs

Using Karma, how do I exclude all files that match a pattern except for those within a specific sub-folder?


Try this:

client/vendor/**/!(angular).js

Example

More filenames can be excluded like this:

client/vendor/**/!(angular|angular-route).js

The patterns used here are called globs.

Here is a short guide to glob functionality in node from node-globs on GH.