Skip to content
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { getOwner } from '@ember/-internals/owner';
import { assert } from '@ember/debug';
import { assert, warn } from '@ember/debug';
import { get, set } from '@ember/-internals/metal';
import EmberObject from '@ember/object';
import { getElementView } from './utils';
Expand Down Expand Up @@ -162,7 +162,7 @@ export default class EventDispatcher extends EmberObject {
`You cannot use the same root element (${specifiedRootElement}) multiple times in an Ember.Application`,
!rootElement.classList.contains(ROOT_ELEMENT_CLASS)
);
assert(
warn(
'You cannot make a new Ember.Application using a root element that is a descendent of an existing Ember.Application',
(() => {
let target = rootElement.parentNode;
Expand Down
17 changes: 9 additions & 8 deletions packages/@ember/application/tests/application_test.js
Original file line number Diff line number Diff line change
Expand Up @@ -74,14 +74,15 @@ moduleFor(
});
}

[`@test you cannot make a new application that is a descendant of an existing application`]() {
expectAssertion(() => {
runTask(() =>
this.createSecondApplication({
rootElement: '#one-child',
})
);
});
[`@test you cannot make a new application that is a descendant of an existing application`](
assert
) {
runTask(() =>
this.createSecondApplication({
rootElement: '#one-child',
})
);
assert.ok(true, 'should not raise');
}

[`@test you cannot make a new application that is a duplicate of an existing application`]() {
Expand Down
Loading