I'm trying to get travis-ci to test my nodejs module with jasmine-node. When I run the tests from the commandline, they all pass, but for whatever reason, Travis always reports my build as failing. My .travis.yml looks like this:
language: node_js
node_js:
- 0.6
- 0.8
and my package.json looks like this:
"scripts": {
"test": "jasmine-node tests/*.spec.js"
}
I've tried adding a before_script to my travis.yml
language: node_js
node_js:
- 0.6
- 0.8
before_script:
- "sudo npm i -g jasmine-node"
Any ideas?
npm install --save-dev jasmine-node
– Singularitynode_modules/jasmine-node/bin/jasmine-node tests/*.spec.js
. I'm not sure which is preferred. And I'm not aware that you can specify to install a dep globally in package.json. – Galangalmake test
as the scripts: test command. This allows someone else to install your module and executenpm test
without having any vague global requirements – Singularitynpm run test
. Btw by me I did not need thebefore_script
in the travis.yml... It automatically run the test script... Was there an upgrade by travis since 2012 or what? :-) – Laise