Repository navigation
Conversation
…tion Each removed test or row called the same function, reached the same branch and expected the same result as a test that stays.
Contributor
Author
|
Closing: removing repeated tests saves about half a percent of the suite, which is not worth the review. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Removes the tests of
markdown-toolkitthat only repeat an assertion another test already makes, so the suite isshorter to read. Nothing a remaining test doesn't already check is lost: 741 tests become 736.
A test counts as a repeat here when it calls the same function, reaches the same branch and expects the same result
as a test that stays. The only difference is a value the code doesn't look at, or one that another test already pins.
What was removed
Error tests that pass another block to a builder already tested with one
multi-line comment is a block, and each of the three builders keeps its own test that a block is rejected.
Assertions written twice
template.test.tstwice, word for word.p(' ')giving was asserted by a table row and again by a test below it.document('a', '\nb')had the same row inrender.test.tsanddocument.test.ts.document('a', parse(''), 'b')had a row indocument.test.tsand the same assertion inparse.test.ts.Not in this PR
Tests that resemble another test but differ in something the code does look at stay: the same rule through another
function, several wrong values for one check, or a
@ts-expect-errorthat also checks the types.