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

Add tests for textarea macro #497

Merged
merged 2 commits into from
Feb 5, 2018
Merged

Conversation

alex-ju
Copy link
Contributor

@alex-ju alex-ju commented Feb 5, 2018

This PR:

  • Adds tests to textarea component to ensure the markup is rendered correctly when providing arguments to the macro;
  • Updates CHANGELOG.MD.

Trello Card

@govuk-design-system-ci govuk-design-system-ci temporarily deployed to govuk-frontend-review-pr-497 February 5, 2018 12:29 Inactive
@kr8n3r
Copy link

kr8n3r commented Feb 5, 2018

how does the snapshot get generated?
all other assertions seem fine.

@alex-ju
Copy link
Contributor Author

alex-ju commented Feb 5, 2018

@igloosi: when we have a snapshot assertion (e.g. toMatchSnapshot()), the first time this test is run, Jest creates a snapshot file that looks like the one in this PR. when continuing to work on the project, every time we run this test suite, Jest will do the process over again and compare the old snapshot to a new one. when we actually want to update the snapshot we will use -u flag (or jest --updateSnapshot).

Copy link

@kr8n3r kr8n3r left a comment

Choose a reason for hiding this comment

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

👍

@alex-ju alex-ju merged commit aa359b7 into master Feb 5, 2018
@alex-ju alex-ju deleted the add-tests-for-textarea-macro branch February 5, 2018 16:36
@alex-ju alex-ju mentioned this pull request Feb 20, 2018
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.

3 participants