I have a node.js/express/mocha project. From my project's root dir, whne I do
./node_modules/.bin/mocha --compilers coffee:coffee-script-redux/register test/**/*.coffee --reporter list
1) UnitsController /units.json "before all" hook
․ CordBloodUnit should set attrs: 0ms
․ CordBloodUnit #getMatchCount should get the match count of alleles: 0ms
․ pg-adapter #runQuery should get results of the query: 7ms
․ pg-adapter #runQuery should get Cord Blood Units: 4ms
4 passing (2s)
1 failing
1) UnitsController /units.json "before all" hook:
Error: timeout of 2000ms exceeded
at Object.<anonymous> (/Users/pguruprasad/Projects/jeevan-js/node_modules/mocha/lib/runnable.js:175:14)
at Timer.list.ontimeout (timers.js:101:19)
I see all the tests are being run. But when I want to put the long command in a script to execute, mocha runs only two tests and ignores the remaining. What could be wrong here?
➜ ~jjs git:(master) ✗ touch test1
➜ ~jjs git:(master) ✗ echo "./node_modules/.bin/mocha --compilers coffee:coffee-script-redux/register test/**/*.coffee --reporter list" >> test1
➜ ~jjs git:(master) ✗ cat test1
./node_modules/.bin/mocha --compilers coffee:coffee-script-redux/register test/**/*.coffee --reporter list
➜ ~jjs git:(master) ✗ chmod +x test1
➜ ~jjs git:(master) ✗ ./test1
․ CordBloodUnit should set attrs: 0ms
․ CordBloodUnit #getMatchCount should get the match count of alleles: 0ms
2 passing (2ms)