Skip to content

test: add unit tests for compute24hPriceChange at positive, negative, zero, and fractional scenarios - #675

Merged
Chucks1093 merged 1 commit into
accesslayerorg:mainfrom
sojetunde8:fix/issue-661
Jul 28, 2026
Merged

test: add unit tests for compute24hPriceChange at positive, negative, zero, and fractional scenarios#675
Chucks1093 merged 1 commit into
accesslayerorg:mainfrom
sojetunde8:fix/issue-661

Conversation

@sojetunde8

Copy link
Copy Markdown
Contributor

Closes #661

Summary

  • Add unit tests for compute24hPriceChange covering all three sign outcomes
  • Positive change (oldest 100, latest 150 → 50.00)
  • Negative change (oldest 200, latest 100 → -50.00)
  • Zero change (oldest 100, latest 100 → 0.00) and fractional rounding (oldest 3, latest 4 → 33.33)

Testing

Ran pnpm exec jest src/utils/__tests__/price.utils.test.ts — all 5 tests pass.

@drips-wave

drips-wave Bot commented Jul 27, 2026

Copy link
Copy Markdown

@sojetunde8 Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits.

You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀

Learn more about application limits

@Chucks1093
Chucks1093 merged commit 48af53f into accesslayerorg:main Jul 28, 2026
1 check passed
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.

Add unit tests for computePriceChange helper at positive, negative, and zero change scenarios

2 participants