Docgen: split getIntermediateRepresentation
unit tests in smaller tests
#31468
Conversation
…sts into smaller tests
…t / named export" test
If you want to learn more about WordPress development in general, check out the Core Handbook full of helpful information. |
Thanks for the contribution @ciampo |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
ciampo commentedMay 4, 2021
•
edited
Description
The
getIntermediateRepresentation
unit tests currently have a lot of assertions per test, making them hard to read and debug in case of failure.This PR aims at splitting the assertion into smaller tests.
The actual code for the tests hasn't been updated. The main changes are:
describe
around most testsMost of the diff changes are caused by the change in indentation.
How has this been tested?
npm run test-unit packages/docgen
getIntermediateRepresentation
is more granularScreenshots
N/A
Types of changes
Refactor
Checklist:
*.native.js
files for terms that need renaming or removal).