I'm developing a Node.js module, and I want to use Karma to auto-test it while working.
In my config file, I setup this:
// list of files / patterns to load in the browser files: [ './index.js', './test/indexSpecs.js' ],
Obviously, since Node.js isn't included in the browser files, I get this error:
Uncaught ReferenceError: require is not defined
If i add:
files: [ './node_modules/**/*.js', './index.js', './test/indexSpecs.js' ],
I get a bunch of errors. I think js files get loaded in alphabetical order, which is wrong.
I also think that Node.js cannot be run in a browser, so what I'm trying to do may be totally wrong. Is there an alternative?