-
Notifications
You must be signed in to change notification settings - Fork 49
Conversation
Thanks, 2 things.
|
CLA is signed and filed. I will add the test next and get this submitted too. |
Test added to this branch. Want me to open a new pull request or sufficient? |
var div = document.createElement('div'); | ||
|
||
//No children yet | ||
assert( !div.hasChildNodes(), "should be false with no children" ); |
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.
I'm going to be a bit nit picky here. We follow http://google-styleguide.googlecode.com/svn/trunk/javascriptguide.xml
- No space after (
- No space before )
- Use single quotes
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.
Use assert.isTrue instead so that this fails for thruthy values that are not boolean
No problem at all. I will fix these and resubmit. If there is anything else just let me know as I intend on submitting a bunch of small patches over the next few weeks so any time we spend now will likely reduce time later. |
Okay, updates. I ended up using assert.isTrue() and assert.isFalse(). Wasn't sure from your comment if that is acceptable or if you only wanted me to you isTrue(). Let me know if you want this revised and I will take a read through your code guidelines. Thanks. |
test('hasChildNodes without a shadow root', function() { | ||
var div = document.createElement('div'); | ||
|
||
// No children yet |
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.
No need for these comments. Comments should explain why and not what.
LGTM Can you squash these into a single commit? (there might be one more churn tomorrow, I have to look into our policy related to the AUTHORS file) |
Sure, just let me know tomorrow after you check on the final details and I will wrap it up into a single commit and get it through. |
…tChild means there are childNodes. Added test to verify hasChildNodes() change with formatting per guidelines.
Now a single commit |
Thanks a lot |
Inverted hasChildNodes() logic to ensure that the existance of a firstChild means there are childNodes