On Mint (a derivative of Ubuntu), you go here:
I created the following file:
and with the following contents:
deb http://ppa.launchpad.net/chris-lea/node.js/ubuntu raring main deb-src http://ppa.launchpad.net/chris-lea/node.js/ubuntu raring main
You can install things locally, or globally. Generally speaking the -g switch means global.
To see where stuff in installed:
npm root or npm root -g
To see what stuff you have installed:
That prints out a tree. To make it into just a list, use:
npm list --depth=0
Several choice but the popular ones seems to be
I've settled on Jasmine. It seems very similar to RSpec from the Ruby world. If you want to run Jasmine for backend tests, then you need jasmine-node. Quick way to run all the tests in a project:
jasmine-node spec --autotest --watch .
The "spec" tells you where you tests live. The watch option will watch the directory you specify, so in this case changes to both source and spec files will re-run all the tests. The autotest actually tells jasmine to watch the file system.
I sometimes like to run it like this:
jasmine-node spec --autotest --watch . --color --verbose
The color option will output passing tests in green and failing tests in red. The verbose option will give results for each test, not just the failing ones.
Karma appears to be a test runner centered on running tests in the browser (or, using PhantomJS, the command line). Useful for DOM tests, etc. Not sure how useful this is for simple node backend tests.
Scaffolding tool. Basically involves installing a generator to scaffold the app.
to scaffold an agular app, but note that there is a bug whereby some plugins are not installed. You have to follow it with this:
npm install karma-jasmine --save-dev npm install karma-chrome-launcher --save-dev
Front end package tool. See this:
For a good discussion of the differences between bower and npm.