testing: update testing API with proposals #207512
Merged
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.
This replaces the test provider with:
addCoverage
method on the TestRun. The benefit of this is thattest data can be provided gradually, even upserted, over a test run
to provide more live results.
loadDetailedCoverage
on the profile which loads coverage details.This is the "resolve" handler before.
use to clear allocated resources.
Note that the the
FileCoverage
instance given toloadDetailedCoverage
is the same instance provided to
addCoverage
, so it can be subclassedto tag in additional detail. The
TestRun
instance is also the same, soWeakMap
s can be used for associating data with both.Naming might change over the next week, but there were good feelings
about this structure the API call this morning.
This change has a backwards-compatibility shim, but extensions should
migrate over before our next stable release in ~3 weeks from today.
fyi @jdneo @eleanorjboyd