capaj / require-globify

transform for browserify, which allows to require files with globbing expressions
MIT License
70 stars 11 forks source link

Is there any way to use this in a testing environment? #15

Closed tombh closed 9 years ago

tombh commented 9 years ago

I've been using this module, but when it comes to testing I can't get the hash of required modules because my project isn't being transformed through browserify.

call-a3 commented 9 years ago

What testing environment do you use? Some tools (e.g. karma) have plugins that allow you to use the same tools you use for compilation.

tombh commented 9 years ago

Ah yes, good point. I'm using purely server-side tests using jasmine-node. I think I've figured out a way - by detecting the environment and using the require-dir module for jasmine-node.