xdissent/karma-browserify — pull request #5 by lennym (2013-09-28 15:27:50+00:00)
Title: Prevented double callbacks from browserify.bundle

I had some issues with some modules in our production code causing ```browserify.bundle``` to callback more than once for the same file, which then caused issues in karma itself because the preprocessor for that file would callback more than once meaning karma commenced tests before all files were processed since it only keeps a simple counter to know when all files have been processed.

Adding a simple check around the call to ```depsBundle.bundle``` to see if it had called back previously resolves this issue.

I'll try and put together a simple test case for the multiple callbacks, but right now the only occurrences I have are deep within our production code. However, the dependency paths needed only be very basic in order to trigger the multiple callbacks.

Thanks.