Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Glimmer2] Remove void element test #13187

Merged
merged 1 commit into from
Mar 31, 2016

Conversation

Saranya-Raaj
Copy link

Removed htmlbar void element test and covered it in curly components test.

Part of #13127

cc @chancancode


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

assert.deepEqual(fooBarInstance.childViews.length, 0);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The original test was checking for childNodes of the components element, not for childViews.

I think this (and the one below) should be:

assert.deepEqual(fooBarInstance.element.childNodes.length, 0, 'no childNodes are added for `<input>`');

@rwjblue
Copy link
Member

rwjblue commented Mar 26, 2016

Small nit-pick, but this looks great, thank you!

@Saranya-Raaj
Copy link
Author

@rwjblue Updated, Thanks

@rwjblue
Copy link
Member

rwjblue commented Mar 27, 2016

👍 - LGTM

I'll leave to @chancancode to do final review + merge (I'm not super great at the I-N-U-R style yet 😸).

@homu
Copy link
Contributor

homu commented Mar 27, 2016

☔ The latest upstream changes (presumably #13190) made this pull request unmergeable. Please resolve the merge conflicts.


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

assert.deepEqual(fooBarInstance.element.childNodes.length, 0);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

a small nit-pick, assert.equal is probably clearer here

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍 Done

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

When comparing against 0, it's always a good bet to use assert.strictEqual which uses === instead of == :)

}
});

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

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can ✂️ the {{yield}}

@chancancode
Copy link
Member

Looks good to me! Can be merged after resolving the minor comments above. Thank you @Matrixz!

@chancancode chancancode merged commit 03a96d4 into emberjs:master Mar 31, 2016
chancancode added a commit that referenced this pull request Mar 31, 2016
[Glimmer2] Remove void element test
@chancancode
Copy link
Member

Thanks @Matrixz!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants