karma-runner / karma-commonjs

A Karma plugin. Test CommonJS modules.
MIT License
73 stars 30 forks source link

Karma-commonjs does not work in LernaJS structure #65

Open fernandosouza opened 7 years ago

fernandosouza commented 7 years ago

I work on a project that uses lernajs to structure its components inside a packages folder. One "package" requires one or more sibling "package".

If package-1 requires package-2, Lerna creates a symbolic link to package-2 inside the package-1 node_modules folder.

By running tests for package-1 I got this error:

Uncaught Error: Could not find module '../../package-2/src/Package2' from '/**pathToPackage1**/src/Package1.js' at node_modules/karma-commonjs/client/commonjs_bridge.js:85

I'm not sure, but It might be related to this issue https://github.com/karma-runner/karma-commonjs/issues/34