-
-
Notifications
You must be signed in to change notification settings - Fork 101
Closed
Labels
enhancementNew feature or requestNew feature or requestgood first issueGood for newcomersGood for newcomershelp wantedExtra attention is neededExtra attention is needed
Description
So! At the moment our test suite does a couple of things:
- Runs through each of the test fixtures (listed under
test/cases) and prettier-ifies it using each of the configurations. - Compares the generated code to the stored snapshot.
- Runs rubocop over the generated code to ensure it passes (with a rubocop config that matches the equivalent prettier configuration).
Recently I've added a fourth step for certain tests. That is that the test fixtures are themselves minitest tests, and it runs the tests after it prettier-ifies the code. The reason I did this was because:
- previously the regexp modifiers worked
- I changed some code and updated the snapshots and didn't realize that I had broken the modifiers
- I pushed out a new version
We shouldn't rely on human inspection of the snapshots to ensure nothing broke. Instead, we should write tests! I've already converted over alias and regexp. That leaves the following fixtures:
- alias
- array
- assign
- binary
- blocks
- break
- case
- class
- comments
- defined
- embdoc
- encoding
- hash
- hooks
- if
- kwargs
- lambda
- layout
- method
- next
- numbers
- ranges
- regexp
- rescue
- return
- strings
- super
- while
- yield
You can look at the ones that are already done as an example.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or requestgood first issueGood for newcomersGood for newcomershelp wantedExtra attention is neededExtra attention is needed