General
PromptBeginner5 minmarkdown
<h1 align="center">
<a href="https://prompts.chat">
168
Testing conventions and patterns for selectools
Loading actions...
<a href="https://prompts.chat">
TypeScript and ESLint rules that MUST be followed when creating, modifying, or reviewing any file under apps/frontend/, including .ts, .tsx, .js, and .jsx files. Also apply when discussing frontend linting, type safety, or ESLint configuration.
risks
tests/test_<module>.py — unit tests for each source moduletests/agent/ — agent core, observer, batch, regression teststests/providers/ — provider-specific, model registry, streaming, format teststests/rag/ — RAG pipeline, chunking, hybrid search, vector store teststests/integration/ — cross-module integration teststests/tools/ — tool system testsclass FakeProvider:
name = "fake"
supports_streaming = True
supports_async = True
def complete(self, *, model, system_prompt, messages, tools=None, **kw):
return Message(role=Role.ASSISTANT, content="response")
Always include tools=None in signature — missing it silently hides bugs.
Use to verify exact args passed to provider methods:
class RecordingProvider(FakeProvider):
def __init__(self):
self.calls = []
def complete(self, **kwargs):
self.calls.append(("complete", kwargs))
return Message(role=Role.ASSISTANT, content="ok")
tests/agent/test_regression.pyTestXxxHandling describing the failure modeToolCall objects are yielded (not strings)pytest tests/ -x -q # All tests, stop on first failure
pytest tests/ -k "not e2e" -x -q # Skip E2E (CI mode)
pytest tests/agent/ -x -q # Just agent tests