From b6c70b053f15e4491f358c03834c06b1e82ec9dd Mon Sep 17 00:00:00 2001 From: Robert Jackson Date: Fri, 3 Mar 2017 21:29:20 -0500 Subject: [PATCH] Import `require` (avoid using global require). Relying on global `require` calls causes issues in babel@6. --- lib/ember-test-helpers/build-registry.js | 3 ++- lib/ember-test-helpers/test-module-for-model.js | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/lib/ember-test-helpers/build-registry.js b/lib/ember-test-helpers/build-registry.js index 75227722b..ae16ade19 100644 --- a/lib/ember-test-helpers/build-registry.js +++ b/lib/ember-test-helpers/build-registry.js @@ -1,5 +1,6 @@ -/* globals global, self, requirejs, require */ +/* globals global, self, requirejs */ +import require from 'require'; import Ember from 'ember'; function exposeRegistryMethodsWithoutDeprecations(container) { diff --git a/lib/ember-test-helpers/test-module-for-model.js b/lib/ember-test-helpers/test-module-for-model.js index bb75d4225..ba08911ec 100644 --- a/lib/ember-test-helpers/test-module-for-model.js +++ b/lib/ember-test-helpers/test-module-for-model.js @@ -1,5 +1,6 @@ -/* global DS, require, requirejs */ // added here to prevent an import from erroring when ED is not present +/* global DS, requirejs */ // added here to prevent an import from erroring when ED is not present +import require from 'require'; import TestModule from './test-module'; import Ember from 'ember';