christkv/node-git

Tests crash when installed via npm

medikoo opened this issue · 1 comments

It looks that test folder is added to .npmignore I'm not sure if it's good idea. I think it's quite important to be able to run tests on installed package.

Now using node v0.4.11
bash-3.2$ make test

/Users/medikoo/local/node/lib/node_modules/nodeunit/lib/nodeunit.js:69
        if (err) throw err;
                 ^
Error: ENOENT, No such file or directory '/Users/medikoo/www/common.js/git/node_modules/git/test/'
make: *** [test] Error 1

The test/ folder is not installed via npm because it's 11Mb, whereas the rest of the repo is just over 400Kb. If you need to be able to run tests on an installed package, one way to go is:

projects$ git clone node-git
projects$ cd myproject
myproject$ npm install ../node-git

This way you are using your own fork of node-git while still being able to run tests on it. To fix the crash, I will just add the makefile to .npmignore.