-
-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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
[Glimmer2] Remove void element test #13187
Conversation
|
||
this.render('{{foo-bar}}'); | ||
|
||
assert.deepEqual(fooBarInstance.childViews.length, 0); |
There was a problem hiding this comment.
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>`');
Small nit-pick, but this looks great, thank you! |
3645a4f
to
4c6f156
Compare
@rwjblue Updated, Thanks |
4c6f156
to
a751657
Compare
👍 - LGTM I'll leave to @chancancode to do final review + merge (I'm not super great at the I-N-U-R style yet 😸). |
☔ The latest upstream changes (presumably #13190) made this pull request unmergeable. Please resolve the merge conflicts. |
a751657
to
c881eed
Compare
|
||
this.runTask(() => this.rerender()); | ||
|
||
assert.deepEqual(fooBarInstance.element.childNodes.length, 0); |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍 Done
There was a problem hiding this comment.
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 == :)
c881eed
to
88c6bf3
Compare
} | ||
}); | ||
|
||
this.registerComponent('foo-bar', { ComponentClass: FooBarComponent, template: '{{yield}}' }); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can ✂️ the {{yield}}
Looks good to me! Can be merged after resolving the minor comments above. Thank you @Matrixz! |
88c6bf3
to
03a96d4
Compare
[Glimmer2] Remove void element test
Thanks @Matrixz! |
Removed htmlbar void element test and covered it in curly components test.
Part of #13127
cc @chancancode