title: How to configure Mocha with WebStorm
body: <p>I have issue with running the Mocha tests . </p>
  
  <p>I made configurations for WebStorm, and when I run the Mocha with WebStorm test runner mine tests are working.</p>
  
  <p>But when I run the tests with 'node 'the filename'' from mine terminal I got error of "describe is not defined".</p>
  
  <pre><code>const assert = require('assert');
  
  describe('login', function() {
      describe('find_user', function() {
          it('should find the user after login', function() {
              assert.equal([1,2,3].indexOf(4), -1);
              // should be code for login
          });
      });
  });
  
  
  describe('register', function() {
      describe('register_user', function() {
          it('should find the user after register', function() {
              assert.equal([1,2,3].indexOf(4), -1);
              // should be code for register
          });
      });
  });
  
  describe('contact', function() {
      describe('contact_us', function() {
          it('should find the contact message within the database', function() 
     {
              assert.equal([1,2,3].indexOf(4), -1);
              // should be code for contact us
          });
      });
  });
  </code></pre>
  
  <p>After modifying mine code to this version: I got error "describe is not a function".</p>
  
  <pre><code>const assert = require('assert');
  const mocha = require('mocha');
  const  describe = mocha.describe;
  const  it = mocha.it;
  
  describe('login', function() {
      describe('find_user', function() {
          it('should find the user after login', function() {
              assert.equal([1,2,3].indexOf(4), -1);
              // should be code for login
          });
      });
  });
  
  
  describe('register', function() {
      describe('register_user', function() {
          it('should find the user after register', function() {
              assert.equal([1,2,3].indexOf(4), -1);
              // should be code for register
          });
      });
  });
  
  describe('contact', function() {
      describe('contact_us', function() {
          it('should find the contact message within the database', function() 
   {
              assert.equal([1,2,3].indexOf(4), -1);
              // should be code for contact us
          });
      });
  });
  </code></pre>
  
  <h3>package.json:</h3>
  
  <pre><code>{
    "name": "couponsystem",
    "version": "1.0.0",
    "description": "electron desktop project",
    "main": "js/src/app.js",
    "scripts": {
      "start": "electron ."
    },
    "dependencies": {
      "bootstrap": "^4.2.1",
      "electron": "^4.0.0",
      "handlebars": "^4.0.12",
      "sequelize": "^4.42.0"
    },
    "devDependencies": {
      "mocha": "^5.2.0"
    },
    "author": "maks burkov",
    "license": "ISC"
  }
  </code></pre>
  
  <p>Can you explain me what configurations I need in order to run the tests from terminal?</p>