While installing the node modules for mocha I had tried the below commands
and on running or executing the mocha test I was trying
but I was getting the below error as:
'Mocha' is not recognized as internal or external command
So , after trying everything it came out to be just set the path to environment variables under the System Variables as:
C:\Program Files\nodejs\
and it worked :)