Skip to content


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP


Can't run testem tests in testem #379

duncan-bayne opened this Issue · 2 comments

3 participants


If I run npm test, all the tests pass:

$ npm test
> testem@0.6.16 test /home/duncan/testem
> mocha --timeout 3000 tests/*_tests.js tests/*/*_tests.js -R spec
# snip
  163 passing

However, if I run testem ci, no tests are found:

$ testem ci

# tests 0
# pass  0
# fail  0

# ok

I think the underlying problem is that mocha isn't accessible through my $PATH. If I run testem interactively with testem, I see the following:

Open the URL below in a browser to connect.
      All     ┃
    0/0 ✔     ┃
No tests were run :(

/bin/sh: 1: mocha: not found
/bin/sh: 1: mocha: not found
# snip more of the above error

I'm running Linux Mint 64-bit (Cinnamon), NodeJS v0.10.29, NPM 1.4.16.


@duncan-bayne I've had a similar problem on Cinnamon, because node libs were NOT installed into the /usr/local/.. folder

what do you get when you try

ls -la `which mocha`

I've get

lrwxrwxrwx 1 $USER $USER 35 Jul 23 10:02 /usr/local/bin/mocha -> ../lib/node_modules/mocha/bin/mocha

then optionaly you can write your own ci runner in testem.jsonand make him run the local installed mocha (you need to put it in package.json via npm -i mocha --save-dev) and configure the path to run .node_modules/mocha/bin/mocha


Yeah, npm scripts loads the local bin scripts into the path within its environment, testem doesn't do that.

@airportyh airportyh closed this
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.