testing: expectDiagnostics() should provide an option to ignore ordering #5818
Labels
compiler:core
Issues for @typespec/compiler
feature
New feature or request
good first issue
Good for newcomers
triaged:core
Milestone
Clear and concise description of the problem
Overview
Code churn can easily cause diagnostics to appear in changing orders over time, and this should, in general, not be considered a breaking change.
However, library tests that use this helper function will fail when diagnostic order changes.
It's onerous for every library test author to have to add a wrapper to pre-sort the collections; rather the core library should have a mode that enables this with a simple binary switch, as an addition to the
options
object.The existing strict option could be used, but that would technically be a behavioral breaking change to the test condition.
Current
Expected
Checklist
The text was updated successfully, but these errors were encountered: