Skip to content

Fix fixture serialization with double newline ending - #2069

Merged
nylen merged 11 commits into
masterfrom
add/regenerate-fixtures
Jul 30, 2017
Merged

nylen merged 11 commits into
masterfrom
add/regenerate-fixtures

Conversation

@aduth

@aduth aduth commented Jul 28, 2017

Copy link
Copy Markdown
Member

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

nylen commented Jul 30, 2017

Copy link
Copy Markdown
Member

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

nylen commented Jul 30, 2017

Copy link
Copy Markdown
Member

#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
15 of 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