Skip to content

Add comprehensive tests for useDockLayout hook#7

Closed
mass2527 wants to merge 1 commit intomainfrom
claude/analyze-test-coverage-Ld6QZ
Closed

Add comprehensive tests for useDockLayout hook#7
mass2527 wants to merge 1 commit intomainfrom
claude/analyze-test-coverage-Ld6QZ

Conversation

@mass2527
Copy link
Owner

  • Add @testing-library/react and jsdom for React hook testing
  • Create vitest.config.ts with jsdom environment setup
  • Add ResizeObserver mock in test-setup.ts for jsdom compatibility
  • Add 28 tests covering:
    • Initialization with null, LayoutNode, and lazy initializer
    • addPanel and removePanel operations
    • getRectProps for panel and split rectangles
    • getDragHandleProps behavior
    • getDropIndicatorProps behavior
    • draggingRect state management
    • Custom placement strategy support
    • containerRef availability

- Add @testing-library/react and jsdom for React hook testing
- Create vitest.config.ts with jsdom environment setup
- Add ResizeObserver mock in test-setup.ts for jsdom compatibility
- Add 28 tests covering:
  - Initialization with null, LayoutNode, and lazy initializer
  - addPanel and removePanel operations
  - getRectProps for panel and split rectangles
  - getDragHandleProps behavior
  - getDropIndicatorProps behavior
  - draggingRect state management
  - Custom placement strategy support
  - containerRef availability
@claude
Copy link

claude bot commented Jan 22, 2026

Code review

No issues found. Checked for bugs and CLAUDE.md compliance.

@mass2527 mass2527 closed this Jan 22, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

Comments