node/test/report
Christopher Hiller bff7a46f31
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: https://github.com/nodejs/diagnostics/issues/315

PR-URL: https://github.com/nodejs/node/pull/28630
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Jiawen Geng <technicalcute@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Rich Trott <rtrott@gmail.com>
2019-07-12 14:48:09 -07:00
..
test-report-config.js lib: replace --diagnostic-report-* with --report-* 2019-04-22 19:09:52 +08:00
test-report-fatal-error.js lib: replace --diagnostic-report-* with --report-* 2019-04-22 19:09:52 +08:00
test-report-getreport.js test: check getReport when error with one line stack 2019-07-05 22:47:05 -07:00
test-report-signal.js lib: replace --diagnostic-report-* with --report-* 2019-04-22 19:09:52 +08:00
test-report-uncaught-exception.js lib: replace --diagnostic-report-* with --report-* 2019-04-22 19:09:52 +08:00
test-report-uv-handles.js report: modify getReport() to return an Object 2019-07-12 14:48:09 -07:00
test-report-writereport.js test: check writeReport when error with one line stack 2019-07-05 22:47:03 -07:00
testcfg.py