Q:

ReferenceError: before is not defined (mocha/protractor)

I am using protractor with mocha in react application. When trying to use before() or after() functions it gives me an error:
ReferenceError: before is not defined

However using beforeEach() or afterEach() works perfectly fine.
Here is how I configured protractor.conf.js
exports.config = {
  capabilities: {
    browserName: 'chrome'
  },
  frameworks: ['mocha', 'chai'],
  onPrepare: function() {
    browser.ignoreSynchronization = true;
  }
};

PS. full error:
Stacktrace:
    ReferenceError: before is not defined
    at [object Object].<anonymous> (/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)

A:

I was able to manage by adding framework: jasmine2 to protractor.conf.js and instead of before() and after() I wrote beforeAll() and afterAll(). 
Now it works as a charm.
The details about that issue can be found in this gitHub comment by @juliemr 
Edit: Typo

