Test¶
Test Backend¶
I test si trovano in packages/backend/tests/. Il CI richiede una copertura ≥80%.
Test CLI¶
Test SDK¶
End-to-End¶
Per il test di integrazione completo, avvia il stack con Docker:
Scrivere Test¶
Python¶
Segui il modello esistente in packages/backend/tests/. Usa i fixture di pytest:
import pytest
from app import create_app
@pytest.fixture
def client():
app = create_app({"TESTING": True})
with app.test_client() as client:
yield client
def test_health(client):
response = client.get("/health")
assert response.status_code == 200
TypeScript¶
Usa Vitest o Jest: