Bugfix: Improve CTRF merge and error handling in hooks #29
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 pull request introduces significant enhancements to the CTRF reporting functionality, including a new method for merging test reports, updates to the reporter class.
New CTRF Report Merging Functionality:
src/mergeResults.ts: Added a newmergeResultsfunction that merges CTRF JSON reports based on a directory and file pattern, writes the merged report to a file, and validates the reports using a type guard.Updates to Reporter Class:
src/reporter.ts: Refactored theGenerateCtrfReportclass to remove legacy methods for handling previous reports.Documentation Enhancements:
README.md: Updated the CTRF report merging instructions with examples using the newmergeResultsfunction.Test Updates:
tests/reporter.test.ts: Modified tests to simulate retries and flaky test scenarios, ensuring compatibility with the updated reporter logic.