Nikku/karma-bro — pull request #22 by traviskaufman (2014-09-29 19:28:10+00:00)
Title: fix(plug-in): use minimatch to compare patterns

When figuring out where to insert the built bundle file, karma-bro would exactly compare the patterns from config.preprocessors against those in config.files (using indexOf). This behaves incorrectly when a more general glob pattern is specified in the preprocessor.

This commit fixes this by using minimatch to compare globs when figuring out where to insert the bundle.

For example, given the following config:

```javascript
config.set({
preprocessors: {
‘test/*.js’: [‘browserify’]
},

files: [
‘vendor/external.js’,
‘test/*Spec.js’
]
});
```

karma-bro will now insert the bundle in between the two files specified, because while `test/*Spec.js === test/*.js` returns `false`, `minimatch(‘test/*Spec.js’, ‘test/*.js’)` returns `true`.