diff --git a/tests/integration/components/modifier-manager-test.js b/tests/integration/components/modifier-manager-test.js index f84fc85..224b362 100644 --- a/tests/integration/components/modifier-manager-test.js +++ b/tests/integration/components/modifier-manager-test.js @@ -18,6 +18,15 @@ module('Integration | Component | modifier-manager', function(hooks) { }; }); + module('setModifierManager', function() { + test('it returns the provided object', function(assert) { + let expected = Object.freeze({}); + let actual = Ember._setModifierManager(() => {}, expected); + + assert.strictEqual(actual, expected, 'the passed in object was returned'); + }); + }); + module('installModifier', function(hooks) { hooks.beforeEach(function() { class DidInsertModifier {} diff --git a/vendor/ember-modifier-manager-polyfill.js b/vendor/ember-modifier-manager-polyfill.js index d058a32..a694dfb 100644 --- a/vendor/ember-modifier-manager-polyfill.js +++ b/vendor/ember-modifier-manager-polyfill.js @@ -11,6 +11,7 @@ import { lte, gte } from 'ember-compatibility-helpers'; let MODIFIER_MANAGERS = new WeakMap(); Ember._setModifierManager = function Polyfilled_setModifierManager(managerFactory, modifier) { MODIFIER_MANAGERS.set(modifier, managerFactory); + return modifier; }; let getModifierManager = obj => {