def test_foreach_too_many_params_in_signature():
    """Test that the foreach component raises a ForeachRenderError if too many parameters are passed."""
    with pytest.raises(ForeachRenderError):
        Foreach.create(
            ForEachState.colors_list,
            lambda color, index, extra: text(color),
        )
Test that the foreach component raises a ForeachRenderError if too many parameters are passed.
tests/units/components/core/test_foreach.py