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

Make component unit test for component/panel/color.js #3776

Merged
merged 3 commits into from
Dec 4, 2017
Merged

Make component unit test for component/panel/color.js #3776

merged 3 commits into from
Dec 4, 2017

Conversation

hideokamoto
Copy link
Contributor

@hideokamoto hideokamoto commented Dec 3, 2017

Description

Related to progress on the issue -> Unit Testing Components #641

Added some unit test scripts for PanelColor component.

How Has This Been Tested?

Run unit test command.

$ npm test
 PASS  components/panel/test/color.js
  PanelColor
    ✓ should match snapshot (19ms)
    ✓ should match snapshot when title is empty (3ms)

Checklist:

  • My code is tested.
  • My code follows the WordPress code style.
  • My code follows has proper inline documentation.

@gziolo
Copy link
Member

gziolo commented Dec 4, 2017

I feel like one snapshot test would be enough here. The second test could only validate if the title is set properly. Let's merge as it is. I will open a follow up to explain what I mean :) Thanks for adding those tests 👍

@gziolo gziolo merged commit f68d510 into WordPress:master Dec 4, 2017
@hideokamoto hideokamoto deleted the add/test/panel/color branch December 22, 2017 03:32
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.

2 participants