karma-commonjs
karma-commonjs copied to clipboard
Fails on modules with a shebang
If you require
a module that starts with a shebang, such as #! /usr/bin/node
, the code will fail with a syntax error. This is because karma-commonjs inserts its wrapper in front of the shebang, which leads to invalid code.
We should look for the presence of a shebang line and add our wrapper below it when it's present.
Oh, this is a valid one... and should be relatively easy to fix!