@@ -14,6 +14,7 @@ This directory contains modules used to test the Node.js implementation.
14
14
* [ Heap dump checker module] ( #heap-dump-checker-module )
15
15
* [ HTTP2 module] ( #http2-module )
16
16
* [ Internet module] ( #internet-module )
17
+ * [ Report module] ( #report-module )
17
18
* [ tick module] ( #tick-module )
18
19
* [ tmpdir module] ( #tmpdir-module )
19
20
* [ WPT module] ( #wpt-module )
@@ -796,6 +797,33 @@ a full `setImmediate()` invocation passes.
796
797
` listener ` is an object to make it easier to use a closure; the target object
797
798
should not be in scope when ` listener.ongc() ` is created.
798
799
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 ` [ < ; number>] Process ID to retrieve diagnostic report files for.
808
+ * ` dir ` [ < ; string>] Directory to search for diagnostic report files.
809
+ * return [ < ; 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 ` [ < ; 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 ` [ < ; 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.
799
827
800
828
## tick Module
801
829
0 commit comments