node.js - No description,No repository field,No readme data warning in time of installing Mocha -
i getting warning @ time of installing mocha in ubuntu
npm warn package.json @ no description npm warn package.json @ no repository field. npm warn package.json @ no readme data
my node version v0.10.33 , npm version 1.4.28
i install mocha using :npm install mocha
and getting error when test code in node.js
referenceerror: describe not defined
how resolve error
that's because package.json doesn't have description
, respository
fields nor have corresponding readme file. add those, , it'll fine.
also, as getting referenceerror
, that's because running test using node
. should running follows:
mocha -r spec -u bdd test.js
edited:
you should run based on installed mocha
.
for instance:
root/ tests/test_index.js node_modules/mocha index.js
then should do:
./node_modules/mocha/bin/mocha -r spec -u bdd tests/test_index.js
Comments
Post a Comment