Skip to main content

Crate termesh_test_support

Crate termesh_test_support 

Source
Expand description

Fixtures, fake services, recorded streams, render snapshots. Phase 00+.

Every service trait ships with a fake here so logic is testable without the OS (CONTRIBUTING.md invariants). Keeping them in one crate — rather than behind cfg(test) in each service — is what lets app-level tests and render snapshots use them too.

Re-exports§

pub use fake_clipboard::FakeClipboard;
pub use fake_fs::FakeFileSystem;
pub use fake_git::FakeGitCall;
pub use fake_git::FakeGitControl;
pub use fake_git::FakeGitService;
pub use fake_permission_store::FakePermissionStore;
pub use fake_tasks::FakeTaskService;
pub use scripted_agent::ScriptedAgent;
pub use scripted_agent::ScriptedUpdate;
pub use scripted_lsp::FakeLspCall;
pub use scripted_lsp::FakeLspControl;
pub use scripted_lsp::ScriptedLanguageServer;
pub use scripted_pty::ScriptedPty;
pub use scripted_pty::ScriptedPtyControl;
pub use scripted_search::ScriptedSearch;
pub use scripted_search::ScriptedSearchControl;

Modules§

fake_clipboard
fake_fs
An in-memory FileSystemService so explorer logic is testable without a disk.
fake_git
fake_permission_store
fake_tasks
Deterministic language-neutral task catalog and decoder.
scripted_agent
A scripted ACP agent — the fake that makes the review loop testable (ADR-0007 §7).
scripted_lsp
scripted_pty
Deterministic PTY service for model and integration tests.
scripted_search
Deterministic search service for model and rendering tests.

Structs§

CountingFileSystem
Decorates the in-memory filesystem with algorithmic I/O counters. Tests assert call counts rather than elapsed time, so a loaded CI runner cannot turn a regression into a flaky budget failure.

Functions§

synthetic_tree
A deep, wide shape whose unexplored branches stand in for an arbitrarily large repository. The laziness tests count directory calls, so fully materialising width.pow(depth) nodes would consume memory without strengthening the assertion.