Skip to content

fix(test): handle pretty formatting#377

Merged
ezolenko merged 1 commit into
ezolenko:masterfrom
agilgur5:fix-test-pretty
Jul 12, 2022
Merged

fix(test): handle pretty formatting#377
ezolenko merged 1 commit into
ezolenko:masterfrom
agilgur5:fix-test-pretty

Conversation

@agilgur5

@agilgur5 agilgur5 commented Jul 6, 2022

Copy link
Copy Markdown
Collaborator

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