def raise_console_error(request, mocker: MockerFixture):
    """Spy on calls to `console.error` used by the framework.

    Help catch spurious error conditions that might otherwise go unnoticed.

    If a test is marked with `ignore_console_error`, the spy will be ignored
    after the test.

    Args:
        request: The pytest request object.
        mocker: The pytest mocker object.

    Yields:
        control to the test function.
    """
    spy = mocker.spy(reflex.app.console, "error")
    yield
    if "ignore_console_error" not in request.keywords:
        spy.assert_not_called()
Spy on calls to `console.error` used by the framework.

    Help catch spurious error conditions that might otherwise go unnoticed.

    If a test is marked with `ignore_console_error`, the spy will be ignored
    after the test.

    Args:
        request: The pytest request object.
        mocker: The pytest mocker object.

    Yields:
        control to the test function.
    
tests/integration/conftest.py