AGENT SKILL

buoyient-mock-mode

How to set up local mock mode for manual testing of apps that use buoyient, so the app runs against fake server responses without a real backend. Use this skill when the user wants to run their app with mock data, set up a developer toggle for fake/real server, create a local testing mode, build a demo mode, configure mock responses at runtime, or test the app manually without a backend. Also trigger when the user mentions mock mode, fake server, demo mode, local testing mode, or developer toggle in the context of buoyient or SyncableObjectService.

License 许可
Apache-2.0
最近更新
2026-05-23
Stars
★ 4
Forks
0

01 前言 Front Matter

name
buoyient-mock-mode
description
How to set up local mock mode for manual testing of apps that use buoyient, so the app runs against fake server responses without a real backend. Use this skill when the user wants to run their app with mock data, set up a developer toggle for fake/real server, create a local testing mode, build a demo mode, configure mock responses at runtime, or test the app manually without a backend. Also trigger when the user mentions mock mode, fake server, demo mode, local testing mode, or developer toggle in the context of buoyient or SyncableObjectService.

03 SKILL.md 正文

Use docs/mock-mode.md as the authoritative guide, and the project-level context file (CLAUDE.md / CODEX.md) for shared project conventions.

Key points to remember:

  • Mock mode works by setting Buoyient.httpClient (in com.elvdev.buoyient.globalconfigs) to a mock-backed HTTP client before creating any services — no changes to service classes needed.
  • Use MockEndpointRouter from the :mock-mode module to register mock HTTP handlers.
  • Use MockServerStore for stateful mock mode with realistic CRUD behavior.
  • TestConnectivityChecker should be set to online = true in mock mode.
  • Conflict simulation uses SyncableObjectRebaseHandler (not SyncableObjectMergeHandler).
  • Include all fields that SyncUpConfig.fromResponseBody() expects in mock responses — missing fields will cause it to return SyncUpResult.Failed.RemovePendingRequest.
  • Scope the :mock-mode dependency to debug builds with debugImplementation.

04 同仓库更多 Skills