У меня есть проект node.js/express/mocha. Из корневого каталога моего проекта, который я делаюПочему не работает bin/mocha все мои тесты?
./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)
Я вижу, что все тесты выполняются. Но когда я хочу поместить длинную команду в сценарий для выполнения, mocha запускает только два теста и игнорирует оставшиеся. Что здесь может быть не так?
➜ ~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)
Вы могли бы добавить к дереву для обозначения 'test /'? Учитывая, что ответ @ dankohn не работает? – Tracker1