How to install mocha, chai?

my name is frank I would like to learn to use mocha, chai, to test jquery/javasript programparts, but I need help to install it. I have windows 7, I learned from my research , I need node.js but I don’t know what to do. as I type npm… I get the error npm is not recogmized, I made mistake, obviously, at the moment I have no idea hot to get farther, please help me, thank you, frank
ps: I installed node.js, and running npm -v, I’ve got the error msg: referenceerror: npm is not defined. this is what I used:

Your question is a bit weird, but in Meteor app you need to add meteor before your npm command.

For example:
meteor npm i

1 Like

I am sorry for inconveniences but I am very beginer, at the moment even struggling to instal and be able to run mocha. I downloaded node.js and installed it. as I clicked on it, I got a command prompt, where I typed te npm… command, where I got the above mentioned error message. I don’t understand the whole thing, please help me, thank you, frank

Hi storyteller
I don’t understand it. I downloaded node.js from the official site, installed it, and clicking on it, I’ve got cli, wher I typed npm and it was not recognized. what did I do wrong? this testing matter with mocha is difficult, not having proper documentation or relevant support is not possible to learn and use it. still I don’t get it. is there any help? thank you frank

Are you trying to use mocha with a Meteor app, or is this for a standalone Node app?

to be honest I am very confused. I downloaded node.js and installed it. clicking on it a cli opened up and tried to follow instructions from node.js site, I’ve got error message.
another option was: sitepoint: I copied and pasted links in my html page, then initializing mocha , not working. I try to test jquery code of form fields and I screwed up. can I get help? thank you , frank
ps : if I use meteor , what shoul I do to be able to use mocha? thank you, frank

I tried standalone node app

If I remember correctly you will have to install npm for that before you can proceed. Can’t really help you there as I haven’t build a node only app in ages so I don’t recall what the process there is.