import pytest

from crystflux.v1.core.json_types import sort_json_value


def test_sort_json_value_rejects_set_with_helpful_message() -> None:
    with pytest.raises(TypeError, match="JSON does not support set type"):
        sort_json_value({1, 2, 3})  # type: ignore[arg-type]


def test_sort_json_value_rejects_unsupported_type() -> None:
    class Custom:
        pass

    with pytest.raises(TypeError, match="Unsupported type for JsonValue: Custom"):
        sort_json_value(Custom())  # type: ignore[arg-type]
