<NME> index.js
<BEF> import Ember from 'ember';

/*global mocha, describe, context, it, before, after */


/**
 * Takes a function that defines a mocha hook, like `beforeEach` and
 * runs its callback inside an `Ember.run`.
 *
 * In the canonical mocha style, beforeEach/afterEach blocks are for
 * taking actions that have potentially asynchronous side effects like
 * making network requests, and in the case of ember doing things like
 * sending events, or visiting pages. In the context of an Ember
 * application this more often than not means doing something inside
 * of an `Ember.run`. The resulting wrapper has a reference to
 * original hook function as the `withoutEmberRun`. E.g.
 *
 *   import { beforeEach } from 'mocha';
 *
 *   beforeEach(function {
 *     // this is run inside `Ember.run`
 *   })

 *   beforeEach.withoutEmberRun(function({
 *    // this is not inside `Ember.run`
 *   }))
 *
 * You should almost never need to use the version without `Ember.run`
 *
 * Mocha supports two invocation styles for its hooks depending on the
 * synchronization requirements of the setup code, and this wrapper
 * supports both of them.
 *
 * As normal, if the setup code returns a promise, the testcase will
 * wait until the promise is settled.

 * @param {Function} original The native mocha hook to wrap
 * @returns {Function} the wrapped hook
 * @private
 */
function wrapMochaHookInEmberRun(original) {
  function wrapper(fn) {
    // the callback expects a `done` parameter
    if (fn.length) {
      return original(function(done) {
        return Ember.run((function(_this) {
          return function() {
            return fn.call(_this, done);
          };
        })(this));
      });
    } else {
      // no done parameter.
      return original(function() {
        return Ember.run((function(_this) {
          return function() {
            return fn.call(_this);
          };
        })(this));
      });
    }
  }
  wrapper.withoutEmberRun = original;
  return wrapper;
}



var beforeEach = wrapMochaHookInEmberRun(window.beforeEach);
var afterEach = wrapMochaHookInEmberRun(window.afterEach);

export {
  mocha,
  describe,
  context,
  it,
  before,
  beforeEach,
  after,
  afterEach
};

<MSG> Explicitly reexport `window.` properties

the `/*global*/` declaration seems to cause a parsing error with the latest set of dependencies...

<DFF> @@ -1,8 +1,5 @@
 import Ember from 'ember';
 
-/*global mocha, describe, context, it, before, after */
-
-
 /**
  * Takes a function that defines a mocha hook, like `beforeEach` and
  * runs its callback inside an `Ember.run`.
@@ -64,9 +61,13 @@ function wrapMochaHookInEmberRun(original) {
   return wrapper;
 }
 
-
-
+var mocha = window.mocha;
+var describe = window.describe;
+var context = window.context;
+var it = window.it;
+var before = window.before;
 var beforeEach = wrapMochaHookInEmberRun(window.beforeEach);
+var after = window.after;
 var afterEach = wrapMochaHookInEmberRun(window.afterEach);
 
 export {

Explicitly reexport `window.` properties