| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -67,3 +67,17 @@ function validate() { | |||
| 67 | 67 | helper.validate(filename); | |
| 68 | 68 | fs.unlinkSync(filename); | |
| 69 | 69 | } | |
| 70 | + | ||
| 71 | + // Test with an invalid file argument. | ||
| 72 | + [null, 1, Symbol(), function() {}].forEach((file) => { | ||
| 73 | + common.expectsError(() => { | ||
| 74 | + process.report.triggerReport(file); | ||
| 75 | + }, { code: 'ERR_INVALID_ARG_TYPE' }); | ||
| 76 | + }); | ||
| 77 | + | ||
| 78 | + // Test with an invalid error argument. | ||
| 79 | + [null, 1, Symbol(), function() {}, 'foo'].forEach((error) => { | ||
| 80 | + common.expectsError(() => { | ||
| 81 | + process.report.triggerReport('file', error); | ||
| 82 | + }, { code: 'ERR_INVALID_ARG_TYPE' }); | ||
| 83 | + }); | ||
| Back | FazBrowse Home | New Git URL |
0 commit comments