(error: { name?: string; message?: string; code?: string | number; stack?: string; cause?: any })
| 3 | const random = () => Math.random().toString(36).slice(2); |
| 4 | |
| 5 | const g = (error: { name?: string; message?: string; code?: string | number; stack?: string; cause?: any }) => { |
| 6 | return { |
| 7 | name: random(), |
| 8 | message: random(), |
| 9 | code: 'code' in error ? error.code : random(), |
| 10 | stack: random(), |
| 11 | ...error, |
| 12 | }; |
| 13 | }; |
| 14 | |
| 15 | const s = (stack: string) => { |
| 16 | const evalIndex = stack.indexOf('eval at '); |
no test coverage detected