node.js - tests in nodejs with compoundjs and mocha -
i have created scratch scaffolded compoundjs app using:
compound init test_app && cd test_app
than
compound g crud user id name password created:date
than
npm test
which runs: ./node_modules/.bin/mocha --include test/init.js test//.test.js
however, following output errors:
> test_app@0.0.1 test /home/ubuntu/test_app
./node_modules/.bin/mocha --include test/init.js test//.test.js
✖ 1 of 10 tests failed: 1) usercontroller "before each" hook: referenceerror: getapp not defined @ context.<anonymous> (/home/ubuntu/test_app/test/controllers/users_controller.test.js:16:11) @ hook.runnable.run (/home/ubuntu/test_app/node_modules/mocha/lib/runnable.js:196:15) @ next (/home/ubuntu/test_app/node_modules/mocha/lib/runner.js:243:10) @ object._onimmediate (/home/ubuntu/test_app/node_modules/mocha/lib/runner.js:254:5) @ processimmediate [as _immediatecallback] (timers.js:317:15) npm err! test failed. see above more details. npm err! not ok code 0
using mocha fixed issue:
mocha test/*
Comments
Post a Comment