Skip to content

test: add coverage for GridGenerator.ring and .spiral#123

Open
dusan-maintains wants to merge 1 commit into
Hellenic:masterfrom
dusan-maintains:maintenance/add-ring-spiral-tests
Open

test: add coverage for GridGenerator.ring and .spiral#123
dusan-maintains wants to merge 1 commit into
Hellenic:masterfrom
dusan-maintains:maintenance/add-ring-spiral-tests

Conversation

@dusan-maintains
Copy link
Copy Markdown

Summary

  • Add focused test coverage for GridGenerator.ring() and GridGenerator.spiral().
  • Validate distance/radius invariants and uniqueness for ring output.
  • Validate center inclusion and expected cell count for spiral output.

Why

Test Plan

  • npx jest test/src/GridGenerator.test.tsx --runInBand
  • Result in this environment: all 9 tests passed.

Notes

  • Scope is intentionally limited to tests only; no runtime behavior changes.

Copy link
Copy Markdown

@StantonMatt StantonMatt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Checked this locally on Node v22.22.2 / npm 10.9.7.

The targeted command from the PR passes:

npx jest test/src/GridGenerator.test.tsx --runInBand

Result: 9/9 GridGenerator tests passed, including the new ring and spiral coverage.

I also ran the full suite:

CI=1 npm test -- --runInBand

Result: 7 suites passed, 36 tests passed, 1 skipped, 9 snapshots passed.

The remaining skipped test is Hexagon should render correctly with default props in test/src/Hexagon/Hexagon.test.tsx, so it is separate from the old commented-out GridGenerator ring/spiral placeholder that this PR replaces. No PR checks are currently configured/running, so local verification is the evidence here.

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