(err: unknown)
| 512 | }; |
| 513 | |
| 514 | const buildExecError = (err: unknown): SerializableError => { |
| 515 | if (typeof err === 'string' || err == null) { |
| 516 | return strToError(err || 'Error'); |
| 517 | } |
| 518 | const anyErr = err as any; |
| 519 | if (typeof anyErr.message === 'string') { |
| 520 | if (typeof anyErr.stack === 'string' && anyErr.stack.length > 0) { |
| 521 | return anyErr; |
| 522 | } |
| 523 | return strToError(anyErr.message); |
| 524 | } |
| 525 | return strToError(JSON.stringify(err)); |
| 526 | }; |
| 527 | |
| 528 | function stableRunnerOptionsKey( |
| 529 | options: Record<string, unknown> | undefined, |
no test coverage detected