Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: integrate vitest matchers globally #3425

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

starc007
Copy link

Summary

This PR integrates Vitest matchers globally for fuel-gauge tests, improving test maintainability and type safety.

Changes

  • Add global setup for vitest matchers in test/setup.ts
  • Add proper TypeScript types for custom matcher toEqualBn
  • Remove individual expect.extend() calls from test files
  • Remove @ts-expect-error comments for toEqualBn usage

Testing

  • ✅ All existing tests pass
  • ✅ Type checking passes without errors
  • ✅ Matcher functionality remains unchanged

Copy link

vercel bot commented Nov 26, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
ts-docs-api ✅ Ready (Inspect) Visit Preview 💬 Add feedback Nov 26, 2024 7:18pm

@CLAassistant
Copy link

CLAassistant commented Nov 26, 2024

CLA assistant check
All committers have signed the CLA.

Copy link

vercel bot commented Nov 26, 2024

@starc007 is attempting to deploy a commit to the Fuel Labs Team on Vercel.

A member of the Team first needs to authorize it.

Copy link

codspeed-hq bot commented Nov 27, 2024

CodSpeed Performance Report

Merging #3425 will improve performances by 47.93%

Comparing starc007:starc007/feat/integrate-vitest-matchers-globally (b142a13) with master (d29e884)

Summary

⚡ 1 improvements
✅ 17 untouched benchmarks

Benchmarks breakdown

Benchmark master starc007:starc007/feat/integrate-vitest-matchers-globally Change
Instantiate from an address 576.7 µs 389.8 µs +47.93%

Copy link
Contributor

@Torres-ssf Torres-ssf left a comment

Choose a reason for hiding this comment

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

Hey @starc007,

Thank you so much for this contribution. We really appreciate it 🙏

It appears that the current solution hasn’t resolved the TS errors.

Screenshot 2024-11-27 at 9 13 42 AM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feat Issue is a feature
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Integrate vitest matchers globally
3 participants