Skip to content

[19/N] Add unit tests for AnimatedLinkedListNode, AnimatedDoublyLinkedListNode, and AnimatedCircularlyLinkedListNode - #110

Open
karkir0003 wants to merge 19 commits into
csvistool:masterfrom
karkir0003:karthik/kar-26-add-unit-tests-for-linked-list-animation-nodes
Open

karkir0003 wants to merge 19 commits into
csvistool:masterfrom
karkir0003:karthik/kar-26-add-unit-tests-for-linked-list-animation-nodes

Conversation

@karkir0003

@karkir0003 karkir0003 commented Oct 3, 2026 •

Copy link
Copy Markdown
Contributor

🥞 Stack

  1. ⬅️ [1/N] Update CI to run frontend unit tests #91 (Update CI to run frontend unit tests)
  2. ⬅️ [2/N] Configure React Testing Library and Setup Tests #92 (Configure React Testing Library and Setup Tests)
  3. ⬅️ [3/N] Add unit tests for SideButton component #94 (Add unit tests for SideButton component)
  4. ⬅️ [4/N] Add unit tests for SearchFilter component #95 (Add unit tests for SearchFilter component)
  5. ⬅️ [5/N] Add unit tests for Header and Footer components #96 (Add unit tests for Header and Footer components)
  6. ⬅️ [6/N] Add unit tests for Blob mascot component #97 (Add unit tests for Blob mascot component)
  7. ⬅️ [7/N] Add unit tests for AboutScreen screen #98 (Add unit tests for AboutScreen screen)
  8. ⬅️ [8/N] Add integration tests for HomeScreen screen #99 (Add integration tests for HomeScreen screen)
  9. ⬅️ [9/N] Add unit tests for AlgorithmNotFound404 component #100 (Add unit tests for AlgorithmNotFound404 component)
  10. ⬅️ [10/N] Add integration tests for AlgoScreen screen #101 (Add integration tests for AlgoScreen screen)
  11. ⬅️ [11/N] Add unit tests for ModalSidebarSectionTab component #102 (Add unit tests for ModalSidebarSectionTab component)
  12. ⬅️ [12/N] Add unit tests for BigOModal component #103 (Add unit tests for BigOModal component)
  13. ⬅️ [13/N] Add unit tests for Pseudocode component #104 (Add unit tests for Pseudocode component)
  14. ⬅️ [14/N] Add unit and integration tests for AlgoSection component #105 (Add unit and integration tests for AlgoSection component)
  15. ⬅️ [15/N] Add unit and integration tests for root App component #106 (Add unit and integration tests for root App component)
  16. ⬅️ [16/N] Add unit tests for animation events and undo functions #107 (Add unit tests for animation events and undo functions)
  17. ⬅️ [17/N] Add unit tests for AnimatedObject, AnimatedCircle, and AnimatedHighlightCircle #108 (Add unit tests for AnimatedObject, AnimatedCircle, and AnimatedHighlightCircle)
  18. ⬅️ [18/N] Add unit tests for AnimatedRectangle, AnimatedLabel, and AnimatedLine #109 (Add unit tests for AnimatedRectangle, AnimatedLabel, and AnimatedLine)
  19. 👉 #CURRENT — Add unit tests for AnimatedLinkedListNode, AnimatedDoublyLinkedListNode, and AnimatedCircularlyLinkedListNode (this PR)
  20. ➡️ [20/N] Add unit tests for AnimatedBTreeNode and AnimatedSkipListNode #111 (Add unit tests for AnimatedBTreeNode and AnimatedSkipListNode)

Addresses #93

Context

Adds unit test coverage for node visualization entities used across singly, doubly, and circularly linked lists: AnimatedLinkedListNode.js, AnimatedDoublyLinkedListNode.js, and AnimatedCircularlyLinkedListNode.js.

Changes Made

  • Introduced src/anim/__tests__/AnimatedLinkedListNode.test.js covering AnimatedLinkedListNode (dimensions, vertical/horizontal configurations, linkPosEnd orientation variants, bounding box math, pointer attachment positions, multi-label text positioning, null-pointer diagonal rendering, and UndoDeleteLinkedList state restoration).
  • Introduced src/anim/__tests__/AnimatedDoublyLinkedListNode.test.js covering AnimatedDoublyLinkedListNode (dimensions, prev/next null pointer states, dual pointer compartment dividing lines and diagonal markers, anchor-based tail/head pointer attachments, and UndoDeleteDoublyLinkedList state restoration).
  • Introduced src/anim/__tests__/AnimatedCircularlyLinkedListNode.test.js covering AnimatedCircularlyLinkedListNode (dimensions, tail and head pointer attachments with right-side curve wrapping, null-pointer rendering, and UndoDeleteCircularlyLinkedList state restoration).

Test Plan

  • Ran npm test -- --watchAll=false
  • Ran npm run lint and npm run prettier
  • Verified 100% statement, branch, function, and line coverage across AnimatedLinkedListNode.js, AnimatedDoublyLinkedListNode.js, and AnimatedCircularlyLinkedListNode.js

This branch has not been deployed

No deployments
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.

1 participant