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

chore(tests): Vitest use expect.any(Function) instead of custom matcher #797

Merged
merged 1 commit into from
Jan 4, 2024

Conversation

ghiscoding
Copy link
Member

@ghiscoding ghiscoding commented Jan 4, 2024

Description

Remove unnecessary code

Motivation and Context

I had create a custom Vitest asymmetric matcher expect.toBeFunction() but it turns out that I can simply use expect.any(Function), so we can remove the unnecessary custom matcher

How Has This Been Tested?

Types of changes

  • Chore (change that has absolutely no effect on users)
  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist:

  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have added tests to cover my changes.
  • All new and existing tests passed.

Copy link

codecov bot commented Jan 4, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (549abfa) 98.09% compared to head (92188c3) 98.09%.
Report is 2 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #797   +/-   ##
=======================================
  Coverage   98.09%   98.09%           
=======================================
  Files         157      157           
  Lines       11549    11549           
  Branches     1897     1897           
=======================================
  Hits        11328    11328           
  Misses        220      220           
  Partials        1        1           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@ghiscoding ghiscoding merged commit 0e2c04b into main Jan 4, 2024
6 checks passed
@ghiscoding ghiscoding deleted the chore/remove-unnecessary-tobefunction branch January 4, 2024 19:58
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.

None yet

1 participant