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(test): handle pretty formatting #377

Merged
merged 1 commit into from
Jul 12, 2022

Conversation

agilgur5
Copy link
Collaborator

@agilgur5 agilgur5 commented Jul 6, 2022

Summary

The integration tests (#371) and pretty default change (#372) got merged simultaneously, so the tests need to be updated to handle the new pretty default

Details

  • the coloration of the errors is quite different when using pretty

    • so instead of re-implementing TS's colors in the tests, just test a portion that is the same color: the error text
  • also TS doesn't specify semantic vs. syntax, that's something print-diagnostics does

  • this test is more resilient to change as well I suppose since no error codes or colors

Future Work

Add unit tests for both pretty and non-pretty versions of errors; currently print-diagnostics is one of the few files without unit test coverage

- integration tests and `pretty` default change got merged simultaneously, so the tests need to be updated to handle the new `pretty` default

- the coloration of the errors is quite different when using `pretty`
  - so instead of re-implementing TS's colors in the tests, just test a portion that is the same color: the error text
- also TS doesn't specify semantic vs. syntax, that's something `print-diagnostics` does

- this test is more resilient to change as well I suppose since no error codes or colors
@agilgur5 agilgur5 added kind: regression Specific type of bug -- past behavior that worked is now broken kind: internal Changes only affect the internals, and _not_ the public API or external-facing docs scope: tests Tests could be improved. Or changes that only affect tests labels Jul 6, 2022
@ezolenko ezolenko merged commit 70724b1 into ezolenko:master Jul 12, 2022
@agilgur5 agilgur5 deleted the fix-test-pretty branch July 2, 2023 21:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind: internal Changes only affect the internals, and _not_ the public API or external-facing docs kind: regression Specific type of bug -- past behavior that worked is now broken scope: tests Tests could be improved. Or changes that only affect tests
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants