karma-runner/karma-commonjs — pull request #35 by mzahor (2014-09-26 07:35:34+00:00)
Title: Fixes bug with loading npm modules

Fixes bug with loading npm modules if relative path is used in package.json.
For example see this part of package.json:
{
...
"main": "./moment.js",
...
}

commonjs bridge will try to match it with loaded file in the following line:
if (existingfiles[paths[i]]) {
and fail since paths[i] will be smth like
basepath/node_modules/moment/moment/./moment.js
but in existing files it will be
basepath/node_modules/moment/moment/moment.js