title: ReferenceError: before is not defined (mocha/protractor)
body: <p>I am using <code>protractor</code> with <code>mocha</code> in <code>react</code> application. When trying to use <code>before()</code> or <code>after()</code> functions it gives me an error:</p>
  
  <pre><code>ReferenceError: before is not defined
  </code></pre>
  
  <p>However using <code>beforeEach()</code> or <code>afterEach()</code> works perfectly fine.</p>
  
  <p>Here is how I configured <code>protractor.conf.js</code></p>
  
  <pre><code>exports.config = {
    capabilities: {
      browserName: 'chrome'
    },
    frameworks: ['mocha', 'chai'],
    onPrepare: function() {
      browser.ignoreSynchronization = true;
    }
  };
  </code></pre>
  
  <p>PS. full error:</p>
  
  <pre><code>Stacktrace:
      ReferenceError: before is not defined
      at [object Object].&lt;anonymous&gt; (/myApp/tests/e2e/routes.js:10:5)
      at normalLoader (/myApp/node_modules/babel-core/lib/babel/api/register/node.js:160:5)
      at Object.require.extensions.(anonymous function) [as .js] (/myApp/node_modules/babel-core/lib/babel/api/register/node.js:173:7)
      at require (module.js:380:17)
      at Function.promise (/myApp/node_modules/protractor/node_modules/q/q.js:650:9)
      at _fulfilled (/myApp/node_modules/protractor/node_modules/q/q.js:797:54)
      at self.promiseDispatch.done (/myApp/node_modules/protractor/node_modules/q/q.js:826:30)
      at Promise.promise.promiseDispatch (/myApp/node_modules/protractor/node_modules/q/q.js:759:13)
      at /myApp/node_modules/protractor/node_modules/q/q.js:525:49
      at flush (/myApp/node_modules/protractor/node_modules/q/q.js:108:17)
      at process._tickCallback (node.js:419:13)
  </code></pre>