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 <firstname.lastname@example.org> Reviewed-By: Richard Lau <email@example.com> Reviewed-By: Colin Ihrig <firstname.lastname@example.org> Reviewed-By: Jiawen Geng <email@example.com> Reviewed-By: Ruben Bridgewater <firstname.lastname@example.org> Reviewed-By: Rich Trott <email@example.com>
- Loading branch information...
Showing with 44 additions and 26 deletions.