def test_foreach_component_state():
    """Test that using a component state to render in the foreach raises an error."""
    with pytest.raises(TypeError):
        Foreach.create(
            ForEachState.colors_list,
            ComponentStateTest.create,
        )
Test that using a component state to render in the foreach raises an error.
tests/units/components/core/test_foreach.py