Skip to content

test: add vitest tests for loyalty-rewards-engine.js addEarnedPoints - #7554

Merged
janavipandole merged 2 commits into
janavipandole:mainfrom
tmdeveloper007:test/#7529-loyalty-rewards-add-earned-points-tests
Aug 13, 2026
Merged

test: add vitest tests for loyalty-rewards-engine.js addEarnedPoints#7554
janavipandole merged 2 commits into
janavipandole:mainfrom
tmdeveloper007:test/#7529-loyalty-rewards-add-earned-points-tests

Conversation

@tmdeveloper007

Copy link
Copy Markdown
Contributor

📄 Description

Extended tests/unit/loyalty-rewards-engine.test.js with new describe block for addEarnedPoints covering all tier multipliers (Bronze 1x, Silver 1.25x, Gold 1.5x, Platinum 2x), negative input, NaN guard, and history accumulation.

🔗 Related Issues

Closes #7529

🧩 Type of Change

  • Bug fix
  • New feature
  • Documentation update
  • Style / UI improvement
  • Refactor
  • Test
  • Chore / dependency update

✅ Checklist

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes

Note: This task is being handled by tmdeveloper007 as part of GSSOC (GirlScript Summer of Code) — please assign this PR to the tmdeveloper007 account when picking it up.

@tmdeveloper007 tmdeveloper007 changed the title test : add vitest tests for loyalty-rewards-engine.js addEarnedPoints test: add vitest tests for loyalty-rewards-engine.js addEarnedPoints Aug 12, 2026
@janavipandole
janavipandole merged commit 166e4f7 into janavipandole:main Aug 13, 2026
19 of 22 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

test : add vitest coverage for loyalty-rewards-engine.js addEarnedPoints

2 participants