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

Make wrapito agnostic of testing framework #56

Draft
wants to merge 17 commits into
base: master
Choose a base branch
from

Conversation

sigfriedCub1990
Copy link
Member

@sigfriedCub1990 sigfriedCub1990 commented May 4, 2024

🎩 What?

Make wrapito agnostic of testing framework, i.e it will work with jest, vitest and other test frameworks if needed.

🤔 Why?

  1. Because we don't want to maintain 2 separate libraries
  2. We all could benefits from the improvements in wrapito-vitest

🧪 How has this been tested? / 💥 How will I know if this breaks?

All tests must pass

closes #54

Migration steps

1.- Uninstall wrapito and install wrapito-vitests (changing all imports from wrapito to wrapito-vitest)
2.- Change all post/get/patch methods to uppercase
3.- Change in "src/setupTests.js" assertions with matchers

Initial tests in ACMOFy

First iteration

image

Expect API compatible

ACMOFy

image

BeeGs

image

@arturosdg arturosdg marked this pull request as draft October 17, 2024 10:12
@arturosdg
Copy link
Contributor

We need to change the matcher to use .toUpperCase for the method, to keep consistency with regular wrapito

@sigfriedCub1990
Copy link
Member Author

We need to change the matcher to use .toUpperCase for the method, to keep consistency with regular wrapito

My two cents on this matter is that it shouldn't matter if you use put or PUT to declare a mock. wrapito should be smart enough to allow both.

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.

Make wrapito agnostic of test framework
2 participants