Skip to content

Commit d6f832f

Browse files
committed
Fix OutletView test.
1 parent e23780c commit d6f832f

File tree

1 file changed

+9
-4
lines changed

1 file changed

+9
-4
lines changed

packages/ember/tests/component_registration_test.js

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,20 @@ import Application from 'ember-application/system/application';
55
import Router from 'ember-routing/system/router';
66
import { compile } from 'ember-template-compiler/tests/utils/helpers';
77
import helpers from 'ember-htmlbars/helpers';
8-
import { OutletView } from 'ember-htmlbars/views/outlet';
98
import Component from 'ember-templates/component';
109
import jQuery from 'ember-views/system/jquery';
1110
import { A as emberA } from 'ember-runtime/system/native_array';
1211
import { setTemplates, set as setTemplate } from 'ember-templates/template_registry';
1312
import { test } from 'internal-test-helpers/tests/skip-if-glimmer';
1413
import isEnabled from 'ember-metal/features';
14+
import require from 'require';
15+
16+
let OutletView;
17+
if (isEnabled('ember-glimmer')) {
18+
OutletView = require('ember-glimmer/views/outlet').default;
19+
} else {
20+
OutletView = require('ember-htmlbars/views/outlet').OutletView;
21+
}
1522

1623
var App, appInstance;
1724
var originalHelpers;
@@ -401,7 +408,7 @@ QUnit.test('Components trigger actions in the components context when called fro
401408
jQuery('#fizzbuzz', '#wrapper').click();
402409
});
403410

404-
test('Components receive the top-level view as their ownerView', function(assert) {
411+
QUnit.test('Components receive the top-level view as their ownerView', function(assert) {
405412
setTemplate('application', compile('{{outlet}}'));
406413
setTemplate('index', compile('{{my-component}}'));
407414
setTemplate('components/my-component', compile('<div></div>'));
@@ -424,6 +431,4 @@ test('Components receive the top-level view as their ownerView', function(assert
424431
assert.ok(ownerView, 'owner view was set');
425432
assert.ok(ownerView instanceof OutletView, 'owner view has no parent view');
426433
assert.notStrictEqual(component, ownerView, 'owner view is not itself');
427-
428-
assert.ok(ownerView._outlets, 'owner view has an internal array of outlets');
429434
});

0 commit comments

Comments
 (0)