Mocha description not defined

I have a directory called MochaTests. Inside I have an example of a test found on the mocha website "1.2.3 Mocha". On the command line (My OS is WIN7), I type Mocha, and the result is "0 pass (2 m2)". I installed exactly the same as the instructions say; npm install -g mocha ... from what I can tell, it installs just fine. So, in c: \ MochaTests> I type node, then type .load test1.js. I get ReferrneceError: the description is undefined. Maybe some help. And yes, I already have "googled", but these results do not fix my problem. On nodejs googlegroup there is a message from 12/24/12, which is entitled "description is not defined" ... He claims that he "solved my problems" but gave details of what he did to clarify this mistake.

+8
mocha
source share
1 answer

TL; dg

You want to run mocha instead of node :

Install Mocha (globally)

npm install mocha -g

Then run mocha

mocha

OLD (the message has since been deleted):

This post says to use mocha instead of node in your command, which works for me:

http://comments.gmane.org/gmane.comp.lang.javascript.nodejs/58313

+12
source share

All Articles