Skip to content

test(svg): export and add tests for deterministicRandom() helper#1937

Merged
JhaSourav07 merged 1 commit into
JhaSourav07:mainfrom
prachimaskar:test/deterministicRandom-helper
May 31, 2026
Merged

test(svg): export and add tests for deterministicRandom() helper#1937
JhaSourav07 merged 1 commit into
JhaSourav07:mainfrom
prachimaskar:test/deterministicRandom-helper

Conversation

@prachimaskar
Copy link
Copy Markdown
Contributor

Description

Fixes #342

Exported the deterministicRandom helper function and added 3 unit tests as required by the issue:

  • Same seed always returns the same value (determinism)
  • Result is always in the range [0, 1)
  • Different seeds return different values

All 113 tests pass (110 existing + 3 new).

Pillar

  • 🛠️ Other (Bug fix, refactoring, docs)

Visual Preview

No SVG changes — test-only addition. No visual output is affected.

Checklist before requesting a review:

  • I have read the CONTRIBUTING.md file.
  • I have tested these changes locally.
  • I have run npm run format and npm run lint locally and resolved all errors.
  • My commits follow the Conventional Commits format.
  • I have updated README.md if I added a new theme or URL parameter.
  • I have starred the repo.
  • I have made sure that i have only one commit to merge in this PR.
  • The SVG output matches the CommitPulse "premium quality" aesthetic standard.

@vercel
Copy link
Copy Markdown
Contributor

vercel Bot commented May 31, 2026

@prachimaskar is attempting to deploy a commit to the jhasourav07's projects Team on Vercel.

A member of the Team first needs to authorize it.

@github-actions
Copy link
Copy Markdown

👋 Hey @prachimaskar, welcome to CommitPulse! 🎉

Thanks for opening your first pull request — this is a big deal and we appreciate the effort!

While you wait for a review, please double-check:

  • ✅ You've read the CONTRIBUTING.md checklist
  • npm run lint, npm run format, and npm run test all pass locally
  • ✅ Your PR has a visual preview if it touches any SVG output
  • 💬 You've joined our Discord for faster PR feedback

A maintainer will review your PR shortly. Hang tight! 🚀

Copy link
Copy Markdown
Collaborator

@Aamod007 Aamod007 left a comment

Choose a reason for hiding this comment

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

Exports deterministicRandom and adds 3 unit tests: same seed returns same value, result in [0, 1), different seeds differ. 113/113 tests pass. Clean.

@JhaSourav07 JhaSourav07 merged commit 3db36a3 into JhaSourav07:main May 31, 2026
5 of 6 checks passed
@github-actions
Copy link
Copy Markdown

🎉 Congratulations @prachimaskar! Your PR has been successfully merged. 🚀

Thank you for contributing to CommitPulse. Your work helps us build a better tool for the community.

⚠️ Important for GSSoC Contributors:
You are strictly advised to join our Discord Server as it is mandatory for all GSSoC participants. All important announcements, point claims, and community discussions happen there.

Keep building! 💻✨

@JhaSourav07 JhaSourav07 added GSSoC 2026 level:beginner Small changes Usually isolated fixes or simple UI/text updates. quality:exceptional Outstanding contribution with exceptional implementation quality, testing. gssoc:approved PR has been reviewed and accepted for valid contribution points mentor:Aamod007 labels May 31, 2026
@github-actions github-actions Bot added this to the GSSoC 2026 milestone May 31, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

gssoc:approved PR has been reviewed and accepted for valid contribution points GSSoC 2026 level:beginner Small changes Usually isolated fixes or simple UI/text updates. mentor:Aamod007 quality:exceptional Outstanding contribution with exceptional implementation quality, testing.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

refactor(svg): add tests for deterministicRandom() helper

3 participants