(...stmts: string[])
| 24 | }); |
| 25 | |
| 26 | const wrapped = (...stmts: string[]) => |
| 27 | [ |
| 28 | '(() => {', |
| 29 | ' try {', |
| 30 | ...stmts.map(s => ` ${s}`), |
| 31 | ' } catch (e) {', |
| 32 | ' return e.stack || e.message || String(e);', |
| 33 | ' }', |
| 34 | '})()', |
| 35 | ].join('\n'); |
| 36 | |
| 37 | describe('logMessageToExpression', () => { |
| 38 | const cases: { [name: string]: [string, string] } = { |