Lusito / mockzilla

A mocking toolkit leveraging the power of TypeScript to enhance your jest experience.
https://lusito.github.io/mockzilla/
zlib License
14 stars 2 forks source link

Vitest port #20

Open ohmree opened 1 year ago

ohmree commented 1 year ago

Hi @Lusito, you didn't have discussions enabled so I'm opening an issue instead.

Just wanted to let you know I made a best-effort port of mockzilla to Vitest as the webextension mocking functionality implemented here is the best I've seen and I wanted to use it with Vite plugins like unplugin-auto-import.

I only modified the code and docs where it was necessary to make it compatible with Vitest, and restructured the project to use a monorepo structure.

I've licensed all of my modifications under the same license as Mockzilla itself and linked to this repo from the top-level README.md, I hope that's enough.

If you have any requests, complaints, issues or nitpicks regarding copyright/licensing/attribution etc. then I'll gladly help resolve them.

Lastly - if there's any piece of code you can think of that's obviously jest-specific (the error reporting functionality comes to mind here, I have yet to test it) it'd be nice to know.

Thanks for making this!

EDIT: forgot to link to the actual project: https://github.com/ohmree/vitezilla

Lusito commented 1 year ago

Thanks for the heads up. I don't have much time at hand, so I didn't dive in, but It's always nice to see you work being used.

The only thing worth noting is the voice inside my head, which says code could be shared between the projects, but as my spare time is currently a bit limited, I better ignore that :grinning:.

Anything jest specific is probably easy to spot by the imports with jest in the name.

I'll leave this issue open for now, so others can find your project if they are interested in vitest (personally, I didn't get to try it yet, though I hear good things).

Good luck