Raxol.Test.TestHelper (Raxol v0.5.0)
View SourceProvides common test utilities and setup functions for Raxol tests.
This module includes:
- Test environment setup
- Mock data generation
- Common test scenarios
- Cleanup utilities
Summary
Functions
Captures all terminal output during a test.
Cleans up an ETS table.
Cleans up a process and waits for it to be down.
Cleans up a registry.
Cleans up a temporary directory.
Cleans up test resources and resets the environment.
Creates a temporary directory for test files.
Creates a test component with the given module and initial state.
Sets up a test environment with necessary services and configurations.
Creates a mock terminal for testing.
Simulates a sequence of events on a component.
Starts a test event source.
Generates test events for common scenarios.
Generates test layouts for component positioning.
Generates test styles for component rendering.
Returns a complete theme struct for tests, merging any overrides provided. Ensures all required component_styles are present.
Waits for a condition to be true, with a timeout. Uses event-based synchronization instead of Process.sleep.
Functions
Captures all terminal output during a test.
Cleans up an ETS table.
Cleans up a process and waits for it to be down.
Cleans up a registry.
Cleans up a temporary directory.
Cleans up test resources and resets the environment.
Creates a temporary directory for test files.
Creates a test component with the given module and initial state.
Sets up a test environment with necessary services and configurations.
Creates a mock terminal for testing.
Simulates a sequence of events on a component.
Starts a test event source.
Generates test events for common scenarios.
Generates test layouts for component positioning.
Generates test styles for component rendering.
Returns a complete theme struct for tests, merging any overrides provided. Ensures all required component_styles are present.
Waits for a condition to be true, with a timeout. Uses event-based synchronization instead of Process.sleep.