Skip to content

Commit 66bff50

Browse files
cjihrigtargos
authored andcommitted
test: document report helper module
PR-URL: #27434 Reviewed-By: Richard Lau <[email protected]> Reviewed-By: Rich Trott <[email protected]> Reviewed-By: Luigi Pinca <[email protected]>
1 parent 2c33592 commit 66bff50

File tree

1 file changed

+28
-0
lines changed

1 file changed

+28
-0
lines changed

test/common/README.md

+28
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ This directory contains modules used to test the Node.js implementation.
1414
* [Heap dump checker module](#heap-dump-checker-module)
1515
* [HTTP2 module](#http2-module)
1616
* [Internet module](#internet-module)
17+
* [Report module](#report-module)
1718
* [tick module](#tick-module)
1819
* [tmpdir module](#tmpdir-module)
1920
* [WPT module](#wpt-module)
@@ -796,6 +797,33 @@ a full `setImmediate()` invocation passes.
796797
`listener` is an object to make it easier to use a closure; the target object
797798
should not be in scope when `listener.ongc()` is created.
798799

800+
## Report Module
801+
802+
The `report` module provides helper functions for testing diagnostic reporting
803+
functionality.
804+
805+
### findReports(pid, dir)
806+
807+
* `pid` [&lt;number>] Process ID to retrieve diagnostic report files for.
808+
* `dir` [&lt;string>] Directory to search for diagnostic report files.
809+
* return [&lt;Array>]
810+
811+
Returns an array of diagnotic report file names found in `dir`. The files should
812+
have been generated by a process whose PID matches `pid`.
813+
814+
### validate(report)
815+
816+
* `report` [&lt;string>] Diagnostic report file name to validate.
817+
818+
Validates the schema of a diagnostic report file whose path is specified in
819+
`report`. If the report fails validation, an exception is thrown.
820+
821+
### validateContent(data)
822+
823+
* `data` [&lt;string>] Contents of a diagnostic report file.
824+
825+
Validates the schema of a diagnostic report whose content is specified in
826+
`data`. If the report fails validation, an exception is thrown.
799827

800828
## tick Module
801829

0 commit comments

Comments
 (0)