summaryrefslogtreecommitdiff
path: root/test/report
AgeCommit message (Collapse)Author
2019-07-12report: modify getReport() to return an ObjectChristopher Hiller
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-05test: check getReport when error with one line stackhimself65
PR-URL: https://github.com/nodejs/node/pull/28433 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com> Reviewed-By: Richard Lau <riclau@uk.ibm.com> Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
2019-07-05test: check writeReport when error with one line stackhimself65
PR-URL: https://github.com/nodejs/node/pull/28433 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com> Reviewed-By: Richard Lau <riclau@uk.ibm.com> Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
2019-05-01test: better output for test-report-uv-handles.jsgengjiawen
PR-URL: https://github.com/nodejs/node/pull/27479 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2019-04-27report: print common items first for readabilitygengjiawen
PR-URL: https://github.com/nodejs/node/pull/27367 Reviewed-By: Richard Lau <riclau@uk.ibm.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Yongsheng Zhang <zyszys98@gmail.com>
2019-04-22lib: replace --diagnostic-report-* with --report-*Joyee Cheung
In the code base the word `report` is almost only used to refer to the diagnostic report when it's a noun, and it's programmable interface `process.report()` it not prefixed, so `report` should be unambiguous enough to use without `diagnostic`. PR-URL: https://github.com/nodejs/node/pull/27312 Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2019-04-10report: improve signal name validationcjihrig
PR-URL: https://github.com/nodejs/node/pull/27137 Reviewed-By: Richard Lau <riclau@uk.ibm.com> Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
2019-04-05report: add support for UDP connected socketsRichard Lau
PR-URL: https://github.com/nodejs/node/pull/27072 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com>
2019-03-10report: rename triggerReport() to writeReport()cjihrig
writeReport() is more descriptive of what the function does. PR-URL: https://github.com/nodejs/node/pull/26527 Reviewed-By: Richard Lau <riclau@uk.ibm.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
2019-03-10test: cover triggerReport() failure casecjihrig
PR-URL: https://github.com/nodejs/node/pull/26524 Reviewed-By: Richard Lau <riclau@uk.ibm.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: Daijiro Wachi <daijiro.wachi@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
2019-03-10test: cover stdout/stderr usage in triggerReport()cjihrig
This commit adds coverage for the cases where process.report.filename is 'stdout' or 'stderr'. PR-URL: https://github.com/nodejs/node/pull/26522 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Richard Lau <riclau@uk.ibm.com> Reviewed-By: James M Snell <jasnell@gmail.com>
2019-03-07test: refactor test/report/test-report-signal.jscjihrig
PR-URL: https://github.com/nodejs/node/pull/26446 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Richard Lau <riclau@uk.ibm.com> Reviewed-By: Masashi Hirano <shisama07@gmail.com> Reviewed-By: Beth Griggs <Bethany.Griggs@uk.ibm.com> Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
2019-03-06test: relax timer check in test-report-uv-handles.jsRichard Lau
The underlying JavaScript runtime may schedule tasks at its discretion so there may be more timer handles than the one created by the test. PR-URL: https://github.com/nodejs/node/pull/26434 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
2019-03-05report: refactor configuration managementcjihrig
This commit removes process.report.setOptions(). Instead of using complex configuration synchronization between C++ and JS, this commit introduces individual getters and setters. PR-URL: https://github.com/nodejs/node/pull/26414 Reviewed-By: Richard Lau <riclau@uk.ibm.com> Reviewed-By: Wyatt Preul <wpreul@gmail.com>
2019-03-02test: rename node-report suite to reportcjihrig
This commit renames the "node-report" test suite to "report" in order to begin differentiating core's diagnostic reporting from the original node-report module on npm PR-URL: https://github.com/nodejs/node/pull/26371 Reviewed-By: Richard Lau <riclau@uk.ibm.com> Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Minwoo Jung <minwoo@nodesource.com> Reviewed-By: James M Snell <jasnell@gmail.com>