Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Travis-CI with jasmine-node

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?

like image 887
thewildpendulum Avatar asked Sep 09 '12 04:09

thewildpendulum


1 Answers

After spending some time with the travis-ci lint web app, it looks like it just came down to a matter of formatting in my .travis.yml file. My text editor was inserting tabs, where it appears that yaml requires you only use spaces. I also added quotes around everything for good measure.

It now looks like this, after making sure I was only using single spaces and newlines:

language: node_js
node_js:
    - "0.6"
    - "0.8"
before_script:
    - "npm i -g jasmine-node"
like image 67
thewildpendulum Avatar answered Oct 26 '22 14:10

thewildpendulum