Please sign in to comment.
report: modify getReport() to return an Object
It's likely that anyone using `process.report.getReport()` will be processing the return value thereafter (e.g., filtering fields or redacting secrets). This change eliminates boilerplate by calling `JSON.parse()` on the return value. Also modified the `validateContent()` and `validate()` test helpers in `test/common/report.js` to be somewhat more obvious and helpful. Of note, a report failing validation will now be easier (though still not _easy_) to read when prepended to the stack trace. - Refs: nodejs/diagnostics#315 PR-URL: #28630 Reviewed-By: Anna Henningsen <email@example.com> Reviewed-By: Richard Lau <firstname.lastname@example.org> Reviewed-By: Colin Ihrig <email@example.com> Reviewed-By: Jiawen Geng <firstname.lastname@example.org> Reviewed-By: Ruben Bridgewater <email@example.com> Reviewed-By: Rich Trott <firstname.lastname@example.org>
- Loading branch information...
Showing with 44 additions and 26 deletions.