(page: Page, server: Server)
| 453 | |
| 454 | |
| 455 | async def test_expose_function(page: Page, server: Server) -> None: |
| 456 | await page.expose_function("compute", lambda a, b: a * b) |
| 457 | result = await page.evaluate("compute(9, 4)") |
| 458 | assert result == 36 |
| 459 | |
| 460 | |
| 461 | async def test_expose_function_should_throw_exception_in_page_context( |
nothing calls this directly
no test coverage detected