diff --git a/tests/integration/components/modifier-manager-test.js b/tests/integration/components/modifier-manager-test.js index 224b362..e2f9c94 100644 --- a/tests/integration/components/modifier-manager-test.js +++ b/tests/integration/components/modifier-manager-test.js @@ -27,6 +27,30 @@ module('Integration | Component | modifier-manager', function(hooks) { }); }); + module('createModifier', function() { + test('it passes the `factoryFor` definition', async function(assert) { + assert.expect(1); + + class MyModifier {} + + this.owner.register('modifier:my-modifier', MyModifier); + + Ember._setModifierManager( + () => ({ + createModifier(factory) { + assert.equal(factory.class, MyModifier, 'the factory class is Modifier'); + }, + installModifier() {}, + updateModifier() {}, + destroyModifier() {}, + }), + MyModifier + ); + + await render(hbs`
`); + }); + }); + module('installModifier', function(hooks) { hooks.beforeEach(function() { class DidInsertModifier {}