Skip to main content

create_test_context

Function create_test_context 

Source
pub fn create_test_context() -> KernelContext
Expand description

Create a KernelContext with a real in-memory buffer manager.

This is the standard test context used across all modules. It provides:

  • Real TestBufferManager (stores and retrieves buffers)
  • Fresh EventBus
  • Default MotionEngine, TextObjectEngine
  • Empty MarkBank, OptionRegistry, ServiceRegistry

For tests that need services (undo, search, etc.), create a context with this function and then register services on ctx.services.