Skip to content

Add test coverage for createElement#2273

Merged
JoviDeCroock merged 3 commits into
preactjs:masterfrom
zubhav:create-element-children-test-cov
Jan 22, 2020
Merged

Add test coverage for createElement#2273
JoviDeCroock merged 3 commits into
preactjs:masterfrom
zubhav:create-element-children-test-cov

Conversation

@zubhav

@zubhav zubhav commented Jan 22, 2020

Copy link
Copy Markdown

Added two tests for createElement:

  • When children parameter is passed to the function as null
  • When children parameter is not passed to the function at all

PS: Newbie to contributing

@coveralls

coveralls commented Jan 22, 2020

Copy link
Copy Markdown

Coverage Status

Coverage increased (+0.07%) to 97.745% when pulling 62febe0 on zubhav:create-element-children-test-cov into f2ef48f on preactjs:master.

@zubhav zubhav requested a review from andrewiggins January 22, 2020 21:43

@developit developit left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Nice! These are great to have and will help make sure our memoization doesn't get tripped up by certain types of compiled JSX.

@developit

Copy link
Copy Markdown
Member

Great first PR! Thanks @zubhav :)

@JoviDeCroock JoviDeCroock merged commit 1bd9457 into preactjs:master Jan 22, 2020
@pika-ci

pika-ci Bot commented Jan 22, 2020

Copy link
Copy Markdown

🚀 This PR has been merged! Once a new release is created, any changes will become available on npm. Until then, you can load and install it directly from the Pika CDN:

npm install https://cdn.pika.dev/preact/master

porfirioribeiro pushed a commit to porfirioribeiro/preact that referenced this pull request Feb 3, 2020
* Added test cases for when children param of createElement is unspecified or null

* Assert that other props are still preserved
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.

4 participants