| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent 181bad5 commit f815565
1 file changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -49,3 +49,20 @@ assert.strictEqual(cycle(Function), '[Function: Function]'); | |||
| 49 | 49 | assert.strictEqual(err.name, 'TypeError'); | |
| 50 | 50 | assert.strictEqual(err.code, 'ERR_INVALID_ARG_TYPE'); | |
| 51 | 51 | } | |
| 52 | + | ||
| 53 | + { | ||
| 54 | + let called = false; | ||
| 55 | + class DynamicError extends Error { | ||
| 56 | + get type() { | ||
| 57 | + called = true; | ||
| 58 | + return 'dynamic'; | ||
| 59 | + } | ||
| 60 | + | ||
| 61 | + get shouldIgnoreError() { | ||
| 62 | + throw new Error(); | ||
| 63 | + } | ||
| 64 | + } | ||
| 65 | + | ||
| 66 | + serializeError(new DynamicError()); | ||
| 67 | + assert.deepStrictEqual(called, true); | ||
| 68 | + } | ||
| Back | FazBrowse Home | New Git URL |
0 commit comments