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

StrykerJS + vitest #3465

Closed
lbenie opened this issue Mar 25, 2022 · 22 comments
Closed

StrykerJS + vitest #3465

lbenie opened this issue Mar 25, 2022 · 22 comments
Labels
🚀 Feature request New feature request

Comments

@lbenie
Copy link

lbenie commented Mar 25, 2022

Is your feature request related to a problem? Please describe.
I've been slowly migrating my projects to use vite as the config bundler. With that they recently introduced vitest which allows to share a common transformation pipeline during dev, build, and test time. I don't believe with the current mutators that it would work with vitest as there are no runners for vitest.

Describe the solution you'd like
I don't know if it would be feasible to work with the vitest core dev team and allow a stryker-js configuration using vitest?

Describe alternatives you've considered
unfortunately I don't see any

Additional context
none

@lbenie lbenie added the 🚀 Feature request New feature request label Mar 25, 2022
@lbenie
Copy link
Author

lbenie commented Jun 22, 2022

Any updates for this?

@nicojs
Copy link
Member

nicojs commented Jun 26, 2022

No, it is on the roadmap, but it will take some time to implement. Feel free to implement this feature if you want it to work sooner 😅

@lbenie
Copy link
Author

lbenie commented Jun 27, 2022

@nicojs sure I could take a stab at it, I'd probably need some context on how to build it, could you point me in that direction?

@nicojs
Copy link
Member

nicojs commented Jun 28, 2022

Sure! I would love that! 💜

Instead of explaining it here inside this issue, I'm adding a big slap of documentation into our "create a plugin" guide:

#3607

Please let me know what I can do to help! (you can also join our slack).

If you want to contribute this plugin to the StrykerJS monorepo, you can look at our CONTRIBUTING.md to help you get started with our environment.

@TeunLamers
Copy link
Contributor

We are working on possible solution! Please help us and upvote this issue vitest-dev/vitest#2167

@silverbackdan
Copy link

Will be great to have this support, love mutation testing and your work here on Stryker, thanks.

@rqbazan
Copy link

rqbazan commented Dec 22, 2022

Hey @lbenie ✋ do you are working on this? I would love to help

@lbenie
Copy link
Author

lbenie commented Jan 12, 2023

Hey @lbenie ✋ do you are working on this? I would love to help

Hey man, no unfortunately I haven't had time to work on this. Seems like the stryker team took a jab at it though

@silverbackdan
Copy link

@rqbazan I think @TeunLamers looks like the person to ping if you're looking to help, looks like they were working on a prototype in October last year.

@nicojs
Copy link
Member

nicojs commented Jan 29, 2023

Yes. @TeunLamers was a graduate student implementing Svelte support. Which is almost implemented (see PR). Unfortunately he had to drop Vitest support, because it was to much work to finish during his graduation assignment period. We still have support planned, I hope we can start on it in February

@silverbackdan
Copy link

Thanks for the update @nicojs :) Good luck @TeunLamers with your work for graduation

@SemSnel
Copy link

SemSnel commented Apr 12, 2023

Hi there,

Any updates on vite support? Planning to implement it early on in a new project.

Thanks! :)

@TeunLamers
Copy link
Contributor

Hey, you should keep an eye on this pull request for vitest support! :)

@SemSnel
Copy link

SemSnel commented Apr 12, 2023

@TeunLamers Thank you! Does this also work with typescript? Hope your graduation went well! :)

@TeunLamers
Copy link
Contributor

TeunLamers commented Apr 12, 2023

I succesfully graduated in late January and recently started working in mid March! Depending on your stack it will most likely work.

The Vitest runner should work with Typescript projects because Typescript support is already build in StrykerJS. For Svelte projects Typescript does not work at the moment but is planned at a later date. This Pull request needs te be merged first for Svelte integration and Typescript support comes at a later date after that!

@SemSnel
Copy link

SemSnel commented Apr 12, 2023

@TeunLamers Good to hear! I also need to graduate this year. ^^

Even though I really like Svelte, I want to keep the Tech Stack more average with Vue, Storybook and .NET as backend. Not sure if or when we need to scale this project, so this setup will be probably the best for us.

@TeunLamers
Copy link
Contributor

@SemSnel Good luck with your graduation! ^^

That seems like a solid stack! If you choose a different test runner StrykerJS will for sure work with Vue and Typescript. I have no clue how good testrunner integrations are with Vite besides Vitest so it might be worth the wait.

@DanielRamosAcosta
Copy link

Hey! I've seen that the PR for adding support for vitest has been merged. How is the status of this issue? Thanks!

@silverbackdan
Copy link

@DanielRamosAcosta how cool! I will try to implement and report back

@nicojs
Copy link
Member

nicojs commented Jun 2, 2023

Thanks, everyone, for your patients.

🎉 The vitest runner is released: in v7.0.0

See https://github.com/stryker-mutator/stryker-js/releases/tag/v7.0.0

For the docs, see https://stryker-mutator.io/docs/stryker-js/vitest-runner/

If you have any issues, please let us know. A blog article about this release will be published following Monday.

@nicojs nicojs closed this as completed Jun 2, 2023
@silverbackdan
Copy link

Amazing news, I'll see about adding this into a project :)

@nicojs
Copy link
Member

nicojs commented Jun 5, 2023

Blog article here: https://stryker-mutator.io/blog/announcing-stryker-js-7/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🚀 Feature request New feature request
Projects
None yet
Development

No branches or pull requests

7 participants