Skip to content
This repository was archived by the owner on Jun 23, 2025. It is now read-only.

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

Curation (vitest)

image

Curation (jest)

image

@sigfriedCub1990 sigfriedCub1990 requested a review from SalvaCarsi May 4, 2024 12:08
@arturosdg arturosdg requested a review from a team October 17, 2024 10:01
@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.

@arturosdg
Copy link
Contributor

Makes sense to me, just changed the types and made the matcher use uppercase to verify methods like it was in wrapito

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Make wrapito agnostic of test framework

2 participants