Raxol.ComponentTestHelpers (Raxol v0.4.0)

View Source

Enhanced test helpers for comprehensive component testing in Raxol.

This module provides utilities for:

  • Lifecycle testing
  • State management testing
  • Event handling testing
  • Rendering validation
  • Performance testing
  • Accessibility testing

Summary

Functions

Mounts a component, initializing its state and triggering mount-time effects.

Mounts a child component with a parent, updating the child's state to reference the parent as needed.

Simulates a series of events in sequence.

Simulates a complete component lifecycle sequence.

Unmounts a component, allowing it to clean up resources.

Validates component rendering with various contexts.

Functions

mount_component(component)

This function is deprecated. Use Raxol.AccessibilityTestHelpers instead..

Mounts a component, initializing its state and triggering mount-time effects.

mount_component(child_component, parent_component)

Mounts a child component with a parent, updating the child's state to reference the parent as needed.

simulate_event_sequence(component, events)

Simulates a series of events in sequence.

simulate_lifecycle(component, lifecycle_fn)

Simulates a complete component lifecycle sequence.

unmount_component(component)

Unmounts a component, allowing it to clean up resources.

validate_rendering(component, contexts)

Validates component rendering with various contexts.