(client, expression)
| 368 | } |
| 369 | |
| 370 | async function evaluate(client, expression) { |
| 371 | const result = await client.send('Runtime.evaluate', { |
| 372 | expression, |
| 373 | awaitPromise: true, |
| 374 | returnByValue: true, |
| 375 | }) |
| 376 | if (result.exceptionDetails) { |
| 377 | throw new Error(`Runtime.evaluate failed: ${JSON.stringify(result.exceptionDetails)}`) |
| 378 | } |
| 379 | return result.result?.value |
| 380 | } |
| 381 | |
| 382 | async function getRendererSnapshot(client) { |
| 383 | return evaluate( |
no outgoing calls
no test coverage detected