<NME> test-loader.js
<BEF> ADDFILE
<MSG> Merge pull request #173 from Turbo87/make-addon

Convert to Ember CLI addon
<DFF> @@ -0,0 +1,31 @@
+/* globals jQuery, mocha, require, requirejs */
+
+jQuery(document).ready(function() {
+  var testLoaderModulePath = 'ember-cli-test-loader/test-support/index';
+
+  if (!requirejs.entries[testLoaderModulePath]) {
+    testLoaderModulePath = 'ember-cli/test-loader';
+  }
+
+  var TestLoader = require(testLoaderModulePath)['default'];
+  TestLoader.prototype.shouldLoadModule = function(moduleName) {
+    return moduleName.match(/[-_]test$/) || moduleName.match(/\.jshint$/);
+  };
+
+  TestLoader.prototype.moduleLoadFailure = function(moduleName, error) {
+    describe('TestLoader Failures', function () {
+      it(moduleName + ': could not be loaded', function() {
+        throw error;
+      });
+    });
+  };
+
+  // Attempt to mitigate sourcemap issues in Chrome
+  // See: https://github.com/ember-cli/ember-cli/issues/3098
+  //      https://github.com/ember-cli/ember-cli-qunit/pull/39
+  setTimeout(function() {
+    TestLoader.load();
+
+    window.mochaRunner = mocha.run();
+  }, 250);
+});

Merge pull request #173 from Turbo87/make-addon