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

Fix fixture serialization with double newline ending #2069

Merged
merged 11 commits into from
Jul 30, 2017

Conversation

aduth
Copy link
Member

@aduth aduth commented Jul 28, 2017

Related: #2056
Related: #2034 (cc @nylen)

This pull request seeks to...

  1. Add some utilities around regenerating fixtures
  2. Fix fixture generation including double newline in output

In #2034, the test for valid serialized output was updated to include a newline at the end. However, the newline appending should have been removed from the subsequent output writing. Currently there are two newlines:

https://github.com/WordPress/gutenberg/blob/cec69e8/blocks/test/full-content.js#L170
https://github.com/WordPress/gutenberg/blob/cec69e8/blocks/test/full-content.js#L175

This pull request removes the latter of these.

Testing instructions:

Verify that running the (newly-introduced) fixtures generate scripts result in no changes or test failures:

npm run fixtures:regenerate

@aduth aduth added [Type] Build Tooling Issues or PRs related to build tooling [Type] Automated Testing Testing infrastructure changes impacting the execution of end-to-end (E2E) and/or unit tests. labels Jul 28, 2017
@nylen
Copy link
Member

nylen commented Jul 30, 2017

Looks good & works well for me. I also used this PR to test out a configuration change to code coverage reporting, add a new test fixture, and fix a bug in the test suite that I noticed while doing so.

@nylen
Copy link
Member

nylen commented Jul 30, 2017

#2028, this PR, and #2056 are all modifying the same file - core__latest-posts.json. I'll go ahead and merge this to make it easier to resolve that conflict.

@nylen nylen merged commit b948f6b into master Jul 30, 2017
@nylen nylen deleted the add/regenerate-fixtures branch July 30, 2017 20:43
@vindl vindl mentioned this pull request Mar 31, 2020
17 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Type] Automated Testing Testing infrastructure changes impacting the execution of end-to-end (E2E) and/or unit tests. [Type] Build Tooling Issues or PRs related to build tooling
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants