Friday 9 June 2017

Travis CI, error on npm test using mocha

I'm trying to use Travis CI to run my mocha + chai tests for the first time and I cant seem to figure out why this is happening.

When the Travis build runs:

mocha

sh: 1: mocha: not found

The command "npm test" exited with 1.

.travis.yml

language: node_js

node_js:
- "8"

package.json (not the whole thing)

"scripts": {
    "test": "mocha"
},
"Dependencies": {
    "mocha": "3.4.2",
    "chai": "4.0.2"
},

I also tried the test being: "test": "./node_modules/.bin/mocha" but that didn't work either.

Thanks for your help!



via Tehmo3

No comments:

Post a Comment