tmpvar/jsdom — Issue #336: Using require from within jsdom?
Author: cjroebuck
Created: 2011-10-17 04:25:07+00:00
State: open

I have some code that runs within the jsdom context, specifically I pass it into the src option of jsdom.env(). This code needs to require a module from my node-modules folder, but running it in jsdom errors saying the require function is undefined. Any ideas how I can require modules in this scenario?

PS the module in question is mongoose.