Skip to content

Add unit tests for the infinite scroll Intersection Observer hook #586

Description

@Chucks1093

Summary

The Intersection Observer hook that drives infinite scroll on the creator list has no unit tests. Tests should confirm the callback fires when the observed element enters the viewport and does not fire when it is out of view.

Scope

  • Mock the Intersection Observer API in the test environment
  • Test that the provided callback is called when the observed element becomes visible
  • Test that the callback is not called when the element is not intersecting
  • Test that the observer is disconnected when the hook unmounts
  • Test that the observer is not created when enabled is false

Acceptance Criteria

  • Callback fires on intersection
  • Callback does not fire when not intersecting
  • Observer disconnected on unmount
  • Observer not created when enabled: false

ETA: 12 hours


Coordinate on Telegram

Metadata

Metadata

Labels

Stellar WaveIssues in the Stellar wave program

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions