Skip to content

Commit

Permalink
Merge pull request #13187 from MatrixZ/remove-void-component
Browse files Browse the repository at this point in the history
[Glimmer2] Remove void element test
  • Loading branch information
chancancode committed Mar 31, 2016
2 parents dd58346 + 03a96d4 commit a4bd0e8
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 52 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -413,6 +413,31 @@ moduleFor('Components test: curly components', class extends RenderingTest {
assert.equal($span.attr('class'), 'inner');
}

['@test a void element does not have childNodes'](assert) {
let fooBarInstance;
let FooBarComponent = Component.extend({
tagName: 'input',
init() {
this._super();
fooBarInstance = this;
}
});

this.registerComponent('foo-bar', { ComponentClass: FooBarComponent, template: '' });

this.render('{{foo-bar}}');

this.assertComponentElement(this.firstChild, { tagName: 'input', attrs: { 'class': classes('ember-view') } } );

assert.strictEqual(fooBarInstance.element.childNodes.length, 0);

this.runTask(() => this.rerender());

this.assertComponentElement(this.firstChild, { tagName: 'input', attrs: { 'class': classes('ember-view') } } );

assert.strictEqual(fooBarInstance.element.childNodes.length, 0);
}

['@test it has the right parentView and childViews'](assert) {
let fooBarInstance, fooBarBazInstance;

Expand Down

This file was deleted.

0 comments on commit a4bd0e8

Please sign in to comment.