Skip to content

Commit

Permalink
Merge pull request #15129 from dnachev/service-document-engine-fix
Browse files Browse the repository at this point in the history
Fix access to service:-document in ember-engines
  • Loading branch information
rwjblue committed Apr 27, 2017
2 parents 466960d + 059aed6 commit 837d17c
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
3 changes: 2 additions & 1 deletion packages/ember-application/lib/system/engine-instance.js
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,8 @@ const EngineInstance = EmberObject.extend(RegistryProxyMixin, ContainerProxyMixi
'router:main',
P`-bucket-cache:main`,
'-view-registry:main',
`renderer:-${env.isInteractive ? 'dom' : 'inert'}`
`renderer:-${env.isInteractive ? 'dom' : 'inert'}`,
'service:-document'
];

singletons.forEach(key => this.register(key, parent.lookup(key), { instantiate: false }));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ QUnit.test('unregistering a factory clears all cached instances of that factory'
});

QUnit.test('can build and boot a registered engine', function(assert) {
assert.expect(10);
assert.expect(11);

let ChatEngine = Engine.extend();
let chatEngineInstance;
Expand Down Expand Up @@ -174,7 +174,8 @@ QUnit.test('can build and boot a registered engine', function(assert) {
'router:main',
P`-bucket-cache:main`,
'-view-registry:main',
'-environment:main'
'-environment:main',
'service:-document'
];

let env = appInstance.lookup('-environment:main');
Expand Down

0 comments on commit 837d17c

Please sign in to comment.