mirror of
https://github.com/nodejs/node.git
synced 2026-11-09 15:11:11 -05:00
test: increase triggerReport() coverage
PR-URL: https://github.com/nodejs/node/pull/26268 Reviewed-By: Richard Lau <riclau@uk.ibm.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: James M Snell <jasnell@gmail.com>
This commit is contained in:
1 file changed
+14
@@ -67,3 +67,17 @@ function validate() {
|
||||
helper.validate(filename);
|
||||
fs.unlinkSync(filename);
|
||||
}
|
||||
|
||||
// Test with an invalid file argument.
|
||||
[null, 1, Symbol(), function() {}].forEach((file) => {
|
||||
common.expectsError(() => {
|
||||
process.report.triggerReport(file);
|
||||
}, { code: 'ERR_INVALID_ARG_TYPE' });
|
||||
});
|
||||
|
||||
// Test with an invalid error argument.
|
||||
[null, 1, Symbol(), function() {}, 'foo'].forEach((error) => {
|
||||
common.expectsError(() => {
|
||||
process.report.triggerReport('file', error);
|
||||
}, { code: 'ERR_INVALID_ARG_TYPE' });
|
||||
});
|
||||
Reference in new issue
Block a user