"""
ShelfAI test suite.

Tests core functionality: shelf operations, index parsing,
transcript parsing, session management, and CLI commands.
"""



class TestConfig:
    """Tests for configuration loading."""

    def test_load_config(self, shelf_dir):
        from shelfai.core.config import ShelfConfig

        config = ShelfConfig.load(shelf_dir / "shelf.config.yaml")
        assert config.version == "1.0"
        assert config.project_name == "test-project"
        assert config.session.provider == "anthropic"

    def test_default_config(self):
        from shelfai.core.config import ShelfConfig

        config = ShelfConfig.default()
        assert config.version == "1.0"
        assert "skills" in config.categories

    def test_config_to_yaml(self):
        from shelfai.core.config import ShelfConfig

        config = ShelfConfig.default()
        yaml_str = config.to_yaml()
        assert "version" in yaml_str
        assert "session" in yaml_str


# ──────────────────────────────────────────────
# Test: Transcript Parser
# ──────────────────────────────────────────────


