mirror of
https://github.com/nodejs/node.git
synced 2026-11-26 21:58:26 -05:00
test: document report helper module
PR-URL: https://github.com/nodejs/node/pull/27434 Reviewed-By: Richard Lau <riclau@uk.ibm.com> Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
This commit is contained in:
1 parent
2c335928cd
commit
66bff5071f
1 file changed
+28
@@ -14,6 +14,7 @@ This directory contains modules used to test the Node.js implementation.
|
||||
* [Heap dump checker module](#heap-dump-checker-module)
|
||||
* [HTTP2 module](#http2-module)
|
||||
* [Internet module](#internet-module)
|
||||
* [Report module](#report-module)
|
||||
* [tick module](#tick-module)
|
||||
* [tmpdir module](#tmpdir-module)
|
||||
* [WPT module](#wpt-module)
|
||||
@@ -796,6 +797,33 @@ a full `setImmediate()` invocation passes.
|
||||
`listener` is an object to make it easier to use a closure; the target object
|
||||
should not be in scope when `listener.ongc()` is created.
|
||||
|
||||
## Report Module
|
||||
|
||||
The `report` module provides helper functions for testing diagnostic reporting
|
||||
functionality.
|
||||
|
||||
### findReports(pid, dir)
|
||||
|
||||
* `pid` [<number>] Process ID to retrieve diagnostic report files for.
|
||||
* `dir` [<string>] Directory to search for diagnostic report files.
|
||||
* return [<Array>]
|
||||
|
||||
Returns an array of diagnotic report file names found in `dir`. The files should
|
||||
have been generated by a process whose PID matches `pid`.
|
||||
|
||||
### validate(report)
|
||||
|
||||
* `report` [<string>] Diagnostic report file name to validate.
|
||||
|
||||
Validates the schema of a diagnostic report file whose path is specified in
|
||||
`report`. If the report fails validation, an exception is thrown.
|
||||
|
||||
### validateContent(data)
|
||||
|
||||
* `data` [<string>] Contents of a diagnostic report file.
|
||||
|
||||
Validates the schema of a diagnostic report whose content is specified in
|
||||
`data`. If the report fails validation, an exception is thrown.
|
||||
|
||||
## tick Module
|
||||
|
||||
|
||||
Reference in new issue
Block a user